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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 installed_version = Version(reply); | 182 installed_version = Version(reply); |
183 #endif | 183 #endif |
184 return installed_version; | 184 return installed_version; |
185 } | 185 } |
186 | 186 |
187 } // namespace | 187 } // namespace |
188 | 188 |
189 UpgradeDetectorImpl::UpgradeDetectorImpl() | 189 UpgradeDetectorImpl::UpgradeDetectorImpl() |
190 : weak_factory_(this), | 190 : is_unstable_channel_(false), |
191 is_unstable_channel_(false), | |
192 is_auto_update_enabled_(true), | 191 is_auto_update_enabled_(true), |
193 build_date_(base::GetBuildTime()) { | 192 build_date_(base::GetBuildTime()), |
| 193 weak_factory_(this) { |
194 CommandLine command_line(*CommandLine::ForCurrentProcess()); | 194 CommandLine command_line(*CommandLine::ForCurrentProcess()); |
195 // The different command line switches that affect testing can't be used | 195 // The different command line switches that affect testing can't be used |
196 // simultaneously, if they do, here's the precedence order, based on the order | 196 // simultaneously, if they do, here's the precedence order, based on the order |
197 // of the if statements below: | 197 // of the if statements below: |
198 // - kDisableBackgroundNetworking prevents any of the other command line | 198 // - kDisableBackgroundNetworking prevents any of the other command line |
199 // switch from being taken into account. | 199 // switch from being taken into account. |
200 // - kSimulateUpgrade supersedes critical or outdated upgrade switches. | 200 // - kSimulateUpgrade supersedes critical or outdated upgrade switches. |
201 // - kSimulateCriticalUpdate has precedence over kSimulateOutdated. | 201 // - kSimulateCriticalUpdate has precedence over kSimulateOutdated. |
202 // - kSimulateOutdatedNoAU has precedence over kSimulateOutdated. | 202 // - kSimulateOutdatedNoAU has precedence over kSimulateOutdated. |
203 // - kSimulateOutdated[NoAu] can work on its own, or with a specified date. | 203 // - kSimulateOutdated[NoAu] can work on its own, or with a specified date. |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 | 512 |
513 // static | 513 // static |
514 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { | 514 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { |
515 return Singleton<UpgradeDetectorImpl>::get(); | 515 return Singleton<UpgradeDetectorImpl>::get(); |
516 } | 516 } |
517 | 517 |
518 // static | 518 // static |
519 UpgradeDetector* UpgradeDetector::GetInstance() { | 519 UpgradeDetector* UpgradeDetector::GetInstance() { |
520 return UpgradeDetectorImpl::GetInstance(); | 520 return UpgradeDetectorImpl::GetInstance(); |
521 } | 521 } |
OLD | NEW |