Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: chrome/browser/upgrade_detector_impl.cc

Issue 513663002: Revert of Cleanup: Remove unneeded SSE2 checks and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/cpu.h"
12 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/singleton.h" 15 #include "base/memory/singleton.h"
15 #include "base/path_service.h" 16 #include "base/path_service.h"
16 #include "base/prefs/pref_service.h" 17 #include "base/prefs/pref_service.h"
17 #include "base/process/launch.h" 18 #include "base/process/launch.h"
18 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
19 #include "base/strings/string_util.h" 20 #include "base/strings/string_util.h"
20 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
21 #include "base/time/time.h" 22 #include "base/time/time.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 static bool simulate_outdated = SimulatingOutdated(); 397 static bool simulate_outdated = SimulatingOutdated();
397 if (!simulate_outdated) { 398 if (!simulate_outdated) {
398 std::string brand; 399 std::string brand;
399 if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand)) 400 if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand))
400 return false; 401 return false;
401 402
402 #if defined(OS_WIN) 403 #if defined(OS_WIN)
403 // Don't show the update bubbles to enterprise users (i.e., on a domain). 404 // Don't show the update bubbles to enterprise users (i.e., on a domain).
404 if (base::win::IsEnrolledToDomain()) 405 if (base::win::IsEnrolledToDomain())
405 return false; 406 return false;
407
408 // On Windows, we don't want to warn about outdated installs when the
409 // machine doesn't support SSE2, it's been deprecated starting with M35.
410 if (!base::CPU().has_sse2())
411 return false;
406 #endif 412 #endif
407 } 413 }
408 414
409 base::Time network_time; 415 base::Time network_time;
410 base::TimeDelta uncertainty; 416 base::TimeDelta uncertainty;
411 if (!g_browser_process->network_time_tracker()->GetNetworkTime( 417 if (!g_browser_process->network_time_tracker()->GetNetworkTime(
412 base::TimeTicks::Now(), &network_time, &uncertainty)) { 418 base::TimeTicks::Now(), &network_time, &uncertainty)) {
413 // When network time has not been initialized yet, simply rely on the 419 // When network time has not been initialized yet, simply rely on the
414 // machine's current time. 420 // machine's current time.
415 network_time = base::Time::Now(); 421 network_time = base::Time::Now();
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 518
513 // static 519 // static
514 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { 520 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() {
515 return Singleton<UpgradeDetectorImpl>::get(); 521 return Singleton<UpgradeDetectorImpl>::get();
516 } 522 }
517 523
518 // static 524 // static
519 UpgradeDetector* UpgradeDetector::GetInstance() { 525 UpgradeDetector* UpgradeDetector::GetInstance() {
520 return UpgradeDetectorImpl::GetInstance(); 526 return UpgradeDetectorImpl::GetInstance();
521 } 527 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc ('k') | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698