Hello andreip,

I'd like you to do a code review.  Please execute
        g4 diff -c 8747274

or point your web browser to
        http://mondrian/8747274

to review the following code:

Change 8747274 by [EMAIL PROTECTED] on 2008/10/27 16:17:52 *pending*

        Uses http rather than https for downloading Gears CAB on WinCE.
        
        R=andreip
        [EMAIL PROTECTED]
        DELTA=14  (8 added, 0 deleted, 6 changed)
        OCL=8747274

Affected files ...

... 
//depot/googleclient/gears/opensource/gears/installer/common/download_task.cc#1 
edit
... 
//depot/googleclient/gears/opensource/gears/installer/common/download_task.h#1 
edit
... 
//depot/googleclient/gears/opensource/gears/installer/iemobile/cab_updater.cc#6 
edit
... 
//depot/googleclient/gears/opensource/gears/installer/iemobile/cab_updater.h#4 
edit
... 
//depot/googleclient/gears/opensource/gears/installer/iemobile/periodic_checker.cc#1
 edit

14 delta lines: 8 added, 0 deleted, 6 changed

Also consider running:
        g4 lint -c 8747274

which verifies that the changelist doesn't introduce new style violations.

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 8747274 by [EMAIL PROTECTED] on 2008/10/27 16:17:52 *pending*

        Uses http rather than https for downloading Gears CAB on WinCE.

Affected files ...

... 
//depot/googleclient/gears/opensource/gears/installer/common/download_task.cc#1 
edit
... 
//depot/googleclient/gears/opensource/gears/installer/common/download_task.h#1 
edit
... 
//depot/googleclient/gears/opensource/gears/installer/iemobile/cab_updater.cc#6 
edit
... 
//depot/googleclient/gears/opensource/gears/installer/iemobile/cab_updater.h#4 
edit
... 
//depot/googleclient/gears/opensource/gears/installer/iemobile/periodic_checker.cc#1
 edit

==== 
//depot/googleclient/gears/opensource/gears/installer/common/download_task.cc#1 
- 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/installer/common/download_task.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/installer/common/download_task.cc       
2008-10-27 16:57:55.000000000 +0000
+++ googleclient/gears/opensource/gears/installer/common/download_task.cc       
2008-10-27 16:37:13.000000000 +0000
@@ -83,7 +83,7 @@
       success = true;
     }
   }
-  listener_->DownloadComplete();
+  listener_->DownloadComplete(success);
 }
 
 bool DownloadTask::SaveToFile(BlobInterface *data) {
==== 
//depot/googleclient/gears/opensource/gears/installer/common/download_task.h#1 
- 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/installer/common/download_task.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/installer/common/download_task.h        
2008-10-27 16:57:55.000000000 +0000
+++ googleclient/gears/opensource/gears/installer/common/download_task.h        
2008-10-27 16:45:54.000000000 +0000
@@ -38,7 +38,7 @@
 
   class ListenerInterface {
    public:
-    virtual void DownloadComplete() = 0;
+    virtual void DownloadComplete(bool success) = 0;
   };
 
   static DownloadTask *Create(const char16 *url,
==== 
//depot/googleclient/gears/opensource/gears/installer/iemobile/cab_updater.cc#6 
- 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/installer/iemobile/cab_updater.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/installer/iemobile/cab_updater.cc       
2008-10-27 16:57:55.000000000 +0000
+++ googleclient/gears/opensource/gears/installer/iemobile/cab_updater.cc       
2008-10-27 16:57:39.000000000 +0000
@@ -187,9 +187,11 @@
 }
 
 // DownloadTask::ListenerInterface implementation
-void CabUpdater::DownloadComplete() {
-  // Marshall the callback to the browser thread so that we can show the 
dialog.
-  MessageService::GetInstance()->NotifyObservers(kTopic, NULL);
+void CabUpdater::DownloadComplete(bool success) {
+  if (success) {
+    // Marshall the callback to the browser thread so that we can show the 
dialog.
+    MessageService::GetInstance()->NotifyObservers(kTopic, NULL);
+  }
   MutexLock lock(&download_task_mutex_);
   download_task_->StopThreadAndDelete();
   download_task_ = NULL;
==== 
//depot/googleclient/gears/opensource/gears/installer/iemobile/cab_updater.h#4 
- 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/installer/iemobile/cab_updater.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/installer/iemobile/cab_updater.h        
2008-10-27 16:57:55.000000000 +0000
+++ googleclient/gears/opensource/gears/installer/iemobile/cab_updater.h        
2008-10-27 16:45:02.000000000 +0000
@@ -76,7 +76,7 @@
   virtual void UpdateUrlAvailable(const std::string16 &url);
 
   // DownloadTask::ListenerInterface implementation
-  virtual void DownloadComplete();
+  virtual void DownloadComplete(bool success);
 
   // The periodic update checker. Owned.
   PeriodicChecker* checker_;
==== 
//depot/googleclient/gears/opensource/gears/installer/iemobile/periodic_checker.cc#1
 - 
c:\MyDocs\Gears4/googleclient/gears/opensource/gears/installer/iemobile/periodic_checker.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/installer/iemobile/periodic_checker.cc  
2008-10-22 17:36:08.000000000 +0100
+++ googleclient/gears/opensource/gears/installer/iemobile/periodic_checker.cc  
2008-10-27 16:50:36.000000000 +0000
@@ -30,6 +30,7 @@
 #include "gears/blob/blob_utils.h"
 #include "gears/installer/iemobile/resource.h"
 #include "gears/localserver/common/async_task.h"
+#include "gears/localserver/common/http_constants.h"
 #include "genfiles/product_constants.h"
 
 const char16* kUpgradeUrl = L"http://tools.google.com/service/update2/ff?";
@@ -355,6 +356,11 @@
     if (payload_data->Length() &&
         BlobToString16(payload_data.get(), charset, &xml) &&
         ExtractVersionAndDownloadUrl(xml)) {
+      // If the URL uses HTTPS, switch the scheme to HTTP, because some WinCE
+      // devices complain about certificate permissions when using HTTPS.
+      if (url_.find(HttpConstants::kHttpsScheme) == 0) {
+        url_.replace(0, 5, HttpConstants::kHttpScheme);
+      }
       success = true;
     }
   }

Reply via email to