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

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

Issue 316963002: Move branding information out of google_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for Windows Created 6 years, 6 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
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/cpu.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/singleton.h" 15 #include "base/memory/singleton.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/prefs/pref_service.h" 17 #include "base/prefs/pref_service.h"
18 #include "base/process/launch.h" 18 #include "base/process/launch.h"
19 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/string_util.h" 20 #include "base/strings/string_util.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/time/time.h" 22 #include "base/time/time.h"
23 #include "base/version.h" 23 #include "base/version.h"
24 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/google/google_util.h" 25 #include "chrome/browser/google/google_brand.h"
26 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/chrome_version_info.h" 27 #include "chrome/common/chrome_version_info.h"
28 #include "chrome/common/pref_names.h" 28 #include "chrome/common/pref_names.h"
29 #include "components/network_time/network_time_tracker.h" 29 #include "components/network_time/network_time_tracker.h"
30 #include "content/public/browser/browser_thread.h" 30 #include "content/public/browser/browser_thread.h"
31 #include "ui/base/resource/resource_bundle.h" 31 #include "ui/base/resource/resource_bundle.h"
32 32
33 #if defined(OS_WIN) 33 #if defined(OS_WIN)
34 #include "base/win/win_util.h" 34 #include "base/win/win_util.h"
35 #include "chrome/installer/util/browser_distribution.h" 35 #include "chrome/installer/util/browser_distribution.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 base::Bind(&UpgradeDetectorImpl::DetectUpgradeTask, 353 base::Bind(&UpgradeDetectorImpl::DetectUpgradeTask,
354 weak_factory_.GetWeakPtr())); 354 weak_factory_.GetWeakPtr()));
355 } 355 }
356 356
357 bool UpgradeDetectorImpl::DetectOutdatedInstall() { 357 bool UpgradeDetectorImpl::DetectOutdatedInstall() {
358 // Don't show the bubble if we have a brand code that is NOT organic, unless 358 // Don't show the bubble if we have a brand code that is NOT organic, unless
359 // an outdated build is being simulated by command line switches. 359 // an outdated build is being simulated by command line switches.
360 static bool simulate_outdated = SimulatingOutdated(); 360 static bool simulate_outdated = SimulatingOutdated();
361 if (!simulate_outdated) { 361 if (!simulate_outdated) {
362 std::string brand; 362 std::string brand;
363 if (google_util::GetBrand(&brand) && !google_util::IsOrganic(brand)) 363 if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand))
364 return false; 364 return false;
365 365
366 #if defined(OS_WIN) 366 #if defined(OS_WIN)
367 // Don't show the update bubbles to entreprise users (i.e., on a domain). 367 // Don't show the update bubbles to entreprise users (i.e., on a domain).
368 if (base::win::IsEnrolledToDomain()) 368 if (base::win::IsEnrolledToDomain())
369 return false; 369 return false;
370 370
371 // On Windows, we don't want to warn about outdated installs when the 371 // On Windows, we don't want to warn about outdated installs when the
372 // machine doesn't support SSE2, it's been deprecated starting with M35. 372 // machine doesn't support SSE2, it's been deprecated starting with M35.
373 if (!base::CPU().has_sse2()) 373 if (!base::CPU().has_sse2())
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 // static 479 // static
480 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { 480 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() {
481 return Singleton<UpgradeDetectorImpl>::get(); 481 return Singleton<UpgradeDetectorImpl>::get();
482 } 482 }
483 483
484 // static 484 // static
485 UpgradeDetector* UpgradeDetector::GetInstance() { 485 UpgradeDetector* UpgradeDetector::GetInstance() {
486 return UpgradeDetectorImpl::GetInstance(); 486 return UpgradeDetectorImpl::GetInstance();
487 } 487 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/reset_profile_settings_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698