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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_INFO_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_INFO_UPDATER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_INFO_UPDATER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_INFO_UPDATER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 // Update the version label. | 53 // Update the version label. |
54 void UpdateVersionLabel(); | 54 void UpdateVersionLabel(); |
55 | 55 |
56 // Check and update enterprise domain. | 56 // Check and update enterprise domain. |
57 void UpdateEnterpriseInfo(); | 57 void UpdateEnterpriseInfo(); |
58 | 58 |
59 // Set enterprise domain name. | 59 // Set enterprise domain name. |
60 void SetEnterpriseInfo(const std::string& domain_name); | 60 void SetEnterpriseInfo(const std::string& domain_name); |
61 | 61 |
| 62 // Creates a serial number string. |
| 63 void UpdateSerialNumberInfo(); |
| 64 |
62 // Callback from chromeos::VersionLoader giving the version. | 65 // Callback from chromeos::VersionLoader giving the version. |
63 void OnVersion(const std::string& version); | 66 void OnVersion(const std::string& version); |
64 | 67 |
65 // Handles asynchronously loading the version. | 68 // Handles asynchronously loading the version. |
66 VersionLoader version_loader_; | 69 VersionLoader version_loader_; |
67 // Handles asynchronously loading the boot times. | 70 // Handles asynchronously loading the boot times. |
68 BootTimesLoader boot_times_loader_; | 71 BootTimesLoader boot_times_loader_; |
69 // Used to request version and boot times. | 72 // Used to request version and boot times. |
70 base::CancelableTaskTracker tracker_; | 73 base::CancelableTaskTracker tracker_; |
71 | 74 |
72 // Information pieces for version label. | 75 // Information pieces for version label. |
73 std::string version_text_; | 76 std::string version_text_; |
| 77 std::string serial_number_text_; |
74 | 78 |
75 // Full text for the OS version label. | 79 // Full text for the OS version label. |
76 std::string os_version_label_text_; | 80 std::string os_version_label_text_; |
77 | 81 |
78 ScopedVector<CrosSettings::ObserverSubscription> subscriptions_; | 82 ScopedVector<CrosSettings::ObserverSubscription> subscriptions_; |
79 | 83 |
80 chromeos::CrosSettings* cros_settings_; | 84 chromeos::CrosSettings* cros_settings_; |
81 | 85 |
82 Delegate* delegate_; | 86 Delegate* delegate_; |
83 | 87 |
84 // Weak pointer factory so we can give our callbacks for invocation | 88 // Weak pointer factory so we can give our callbacks for invocation |
85 // at a later time without worrying that they will actually try to | 89 // at a later time without worrying that they will actually try to |
86 // happen after the lifetime of this object. | 90 // happen after the lifetime of this object. |
87 base::WeakPtrFactory<VersionInfoUpdater> weak_pointer_factory_; | 91 base::WeakPtrFactory<VersionInfoUpdater> weak_pointer_factory_; |
88 | 92 |
89 DISALLOW_COPY_AND_ASSIGN(VersionInfoUpdater); | 93 DISALLOW_COPY_AND_ASSIGN(VersionInfoUpdater); |
90 }; | 94 }; |
91 | 95 |
92 } // namespace chromeos | 96 } // namespace chromeos |
93 | 97 |
94 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_INFO_UPDATER_H_ | 98 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_INFO_UPDATER_H_ |
OLD | NEW |