| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/upgrade_detector_impl.h" | 5 #include "chrome/browser/upgrade_detector_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/build_time.h" | 10 #include "base/build_time.h" |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 bool UpgradeDetectorImpl::DetectOutdatedInstall() { | 369 bool UpgradeDetectorImpl::DetectOutdatedInstall() { |
| 370 // Don't show the bubble if we have a brand code that is NOT organic, unless | 370 // Don't show the bubble if we have a brand code that is NOT organic, unless |
| 371 // an outdated build is being simulated by command line switches. | 371 // an outdated build is being simulated by command line switches. |
| 372 static bool simulate_outdated = SimulatingOutdated(); | 372 static bool simulate_outdated = SimulatingOutdated(); |
| 373 if (!simulate_outdated) { | 373 if (!simulate_outdated) { |
| 374 std::string brand; | 374 std::string brand; |
| 375 if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand)) | 375 if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand)) |
| 376 return false; | 376 return false; |
| 377 | 377 |
| 378 #if defined(OS_WIN) | 378 #if defined(OS_WIN) |
| 379 // Don't show the update bubbles to entreprise users (i.e., on a domain). | 379 // Don't show the update bubbles to enterprise users (i.e., on a domain). |
| 380 if (base::win::IsEnrolledToDomain()) | 380 if (base::win::IsEnrolledToDomain()) |
| 381 return false; | 381 return false; |
| 382 | 382 |
| 383 // On Windows, we don't want to warn about outdated installs when the | 383 // On Windows, we don't want to warn about outdated installs when the |
| 384 // machine doesn't support SSE2, it's been deprecated starting with M35. | 384 // machine doesn't support SSE2, it's been deprecated starting with M35. |
| 385 if (!base::CPU().has_sse2()) | 385 if (!base::CPU().has_sse2()) |
| 386 return false; | 386 return false; |
| 387 #endif | 387 #endif |
| 388 } | 388 } |
| 389 | 389 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 490 |
| 491 // static | 491 // static |
| 492 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { | 492 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { |
| 493 return Singleton<UpgradeDetectorImpl>::get(); | 493 return Singleton<UpgradeDetectorImpl>::get(); |
| 494 } | 494 } |
| 495 | 495 |
| 496 // static | 496 // static |
| 497 UpgradeDetector* UpgradeDetector::GetInstance() { | 497 UpgradeDetector* UpgradeDetector::GetInstance() { |
| 498 return UpgradeDetectorImpl::GetInstance(); | 498 return UpgradeDetectorImpl::GetInstance(); |
| 499 } | 499 } |
| OLD | NEW |