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

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

Issue 459603003: Cleanup: Remove unneeded SSE2 checks and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix win build 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"
13 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
14 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
16 #include "base/path_service.h" 15 #include "base/path_service.h"
17 #include "base/prefs/pref_service.h" 16 #include "base/prefs/pref_service.h"
18 #include "base/process/launch.h" 17 #include "base/process/launch.h"
19 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
21 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
22 #include "base/time/time.h" 21 #include "base/time/time.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 static bool simulate_outdated = SimulatingOutdated(); 396 static bool simulate_outdated = SimulatingOutdated();
398 if (!simulate_outdated) { 397 if (!simulate_outdated) {
399 std::string brand; 398 std::string brand;
400 if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand)) 399 if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand))
401 return false; 400 return false;
402 401
403 #if defined(OS_WIN) 402 #if defined(OS_WIN)
404 // Don't show the update bubbles to enterprise users (i.e., on a domain). 403 // Don't show the update bubbles to enterprise users (i.e., on a domain).
405 if (base::win::IsEnrolledToDomain()) 404 if (base::win::IsEnrolledToDomain())
406 return false; 405 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;
412 #endif 406 #endif
413 } 407 }
414 408
415 base::Time network_time; 409 base::Time network_time;
416 base::TimeDelta uncertainty; 410 base::TimeDelta uncertainty;
417 if (!g_browser_process->network_time_tracker()->GetNetworkTime( 411 if (!g_browser_process->network_time_tracker()->GetNetworkTime(
418 base::TimeTicks::Now(), &network_time, &uncertainty)) { 412 base::TimeTicks::Now(), &network_time, &uncertainty)) {
419 // When network time has not been initialized yet, simply rely on the 413 // When network time has not been initialized yet, simply rely on the
420 // machine's current time. 414 // machine's current time.
421 network_time = base::Time::Now(); 415 network_time = base::Time::Now();
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 512
519 // static 513 // static
520 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { 514 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() {
521 return Singleton<UpgradeDetectorImpl>::get(); 515 return Singleton<UpgradeDetectorImpl>::get();
522 } 516 }
523 517
524 // static 518 // static
525 UpgradeDetector* UpgradeDetector::GetInstance() { 519 UpgradeDetector* UpgradeDetector::GetInstance() {
526 return UpgradeDetectorImpl::GetInstance(); 520 return UpgradeDetectorImpl::GetInstance();
527 } 521 }
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