Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / upgrade_detector_impl.cc
index 86d9f46..9b42d27 100644 (file)
@@ -9,6 +9,7 @@
 #include "base/bind.h"
 #include "base/build_time.h"
 #include "base/command_line.h"
+#include "base/cpu.h"
 #include "base/files/file_path.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
@@ -126,10 +127,10 @@ bool IsSystemInstall() {
   return !InstallUtil::IsPerUserInstall(exe_path.value().c_str());
 }
 
-// Sets |is_unstable_channel| to true if the current chrome is on the dev or
-// canary channels. Sets |is_auto_update_enabled| to true if Google Update will
-// update the current chrome. Unconditionally posts |callback_task| to the UI
-// thread to continue processing.
+// This task checks the update policy and calls back the task only if the
+// system is not enrolled in a domain (i.e., not in an enterprise environment).
+// It also identifies if autoupdate is enabled and whether we are running an
+// unstable channel. |is_auto_update_enabled| can be NULL.
 void DetectUpdatability(const base::Closure& callback_task,
                         bool* is_unstable_channel,
                         bool* is_auto_update_enabled) {
@@ -143,7 +144,9 @@ void DetectUpdatability(const base::Closure& callback_task,
         GoogleUpdateSettings::AreAutoupdatesEnabled(app_guid);
   }
   *is_unstable_channel = IsUnstableChannel();
-  BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback_task);
+  // Don't show the update bubbles to entreprise users (i.e., on a domain).
+  if (!base::win::IsEnrolledToDomain())
+    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback_task);
 }
 #endif  // defined(OS_WIN)
 
@@ -364,8 +367,9 @@ bool UpgradeDetectorImpl::DetectOutdatedInstall() {
       return false;
 
 #if defined(OS_WIN)
-    // Don't show the update bubbles to entreprise users (i.e., on a domain).
-    if (base::win::IsEnrolledToDomain())
+    // On Windows, we don't want to warn about outdated installs when the
+    // machine doesn't support SSE2, it's been deprecated starting with M35.
+    if (!base::CPU().has_sse2())
       return false;
 #endif
   }