OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/login/version_info_updater.h" | 5 #include "chrome/browser/chromeos/login/version_info_updater.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 VersionInfoUpdater::VersionInfoUpdater(Delegate* delegate) | 33 VersionInfoUpdater::VersionInfoUpdater(Delegate* delegate) |
34 : delegate_(delegate) { | 34 : delegate_(delegate) { |
35 } | 35 } |
36 | 36 |
37 VersionInfoUpdater::~VersionInfoUpdater() { | 37 VersionInfoUpdater::~VersionInfoUpdater() { |
38 } | 38 } |
39 | 39 |
40 void VersionInfoUpdater::StartUpdate(bool is_official_build) { | 40 void VersionInfoUpdater::StartUpdate(bool is_official_build) { |
41 if (CrosLibrary::Get()->EnsureLoaded()) { | 41 if (CrosLibrary::Get()->EnsureLoaded()) { |
42 version_loader_.EnablePlatformVersions(true); | |
43 version_loader_.GetVersion( | 42 version_loader_.GetVersion( |
44 &version_consumer_, | 43 &version_consumer_, |
45 NewCallback(this, &VersionInfoUpdater::OnVersion), | 44 NewCallback(this, &VersionInfoUpdater::OnVersion), |
46 is_official_build ? | 45 is_official_build ? |
47 VersionLoader::VERSION_SHORT_WITH_DATE : | 46 VersionLoader::VERSION_SHORT_WITH_DATE : |
48 VersionLoader::VERSION_FULL); | 47 VersionLoader::VERSION_FULL); |
49 if (!is_official_build) { | 48 if (!is_official_build) { |
50 boot_times_loader_.GetBootTimes( | 49 boot_times_loader_.GetBootTimes( |
51 &boot_times_consumer_, | 50 &boot_times_consumer_, |
52 NewCallback(this, &VersionInfoUpdater::OnBootTimes)); | 51 NewCallback(this, &VersionInfoUpdater::OnBootTimes)); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 delegate_->OnBootTimesLabelTextUpdated(boot_times_text); | 191 delegate_->OnBootTimesLabelTextUpdated(boot_times_text); |
193 } | 192 } |
194 | 193 |
195 void VersionInfoUpdater::OnPolicyStateChanged( | 194 void VersionInfoUpdater::OnPolicyStateChanged( |
196 policy::CloudPolicySubsystem::PolicySubsystemState state, | 195 policy::CloudPolicySubsystem::PolicySubsystemState state, |
197 policy::CloudPolicySubsystem::ErrorDetails error_details) { | 196 policy::CloudPolicySubsystem::ErrorDetails error_details) { |
198 UpdateEnterpriseInfo(); | 197 UpdateEnterpriseInfo(); |
199 } | 198 } |
200 | 199 |
201 } // namespace chromeos | 200 } // namespace chromeos |
202 | |
OLD | NEW |