| 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_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // Called when OS version label should be updated. | 28 // Called when OS version label should be updated. |
| 29 virtual void OnOSVersionLabelTextUpdated( | 29 virtual void OnOSVersionLabelTextUpdated( |
| 30 const std::string& os_version_label_text) = 0; | 30 const std::string& os_version_label_text) = 0; |
| 31 | 31 |
| 32 // Called when the enterprise info notice should be updated. | 32 // Called when the enterprise info notice should be updated. |
| 33 virtual void OnEnterpriseInfoUpdated( | 33 virtual void OnEnterpriseInfoUpdated( |
| 34 const std::string& enterprise_info) = 0; | 34 const std::string& enterprise_info) = 0; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 explicit VersionInfoUpdater(Delegate* delegate); | 37 explicit VersionInfoUpdater(Delegate* delegate); |
| 38 virtual ~VersionInfoUpdater(); | 38 ~VersionInfoUpdater() override; |
| 39 | 39 |
| 40 // Sets delegate. | 40 // Sets delegate. |
| 41 void set_delegate(Delegate* delegate) { delegate_ = delegate; } | 41 void set_delegate(Delegate* delegate) { delegate_ = delegate; } |
| 42 | 42 |
| 43 // Starts fetching version info. The delegate will be notified when update | 43 // Starts fetching version info. The delegate will be notified when update |
| 44 // is received. | 44 // is received. |
| 45 void StartUpdate(bool is_official_build); | 45 void StartUpdate(bool is_official_build); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // policy::CloudPolicyStore::Observer interface: | 48 // policy::CloudPolicyStore::Observer interface: |
| 49 virtual void OnStoreLoaded(policy::CloudPolicyStore* store) override; | 49 void OnStoreLoaded(policy::CloudPolicyStore* store) override; |
| 50 virtual void OnStoreError(policy::CloudPolicyStore* store) override; | 50 void OnStoreError(policy::CloudPolicyStore* store) override; |
| 51 | 51 |
| 52 // Update the version label. | 52 // Update the version label. |
| 53 void UpdateVersionLabel(); | 53 void UpdateVersionLabel(); |
| 54 | 54 |
| 55 // Check and update enterprise domain. | 55 // Check and update enterprise domain. |
| 56 void UpdateEnterpriseInfo(); | 56 void UpdateEnterpriseInfo(); |
| 57 | 57 |
| 58 // Set enterprise domain name. | 58 // Set enterprise domain name. |
| 59 void SetEnterpriseInfo(const std::string& domain_name); | 59 void SetEnterpriseInfo(const std::string& domain_name); |
| 60 | 60 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 81 // at a later time without worrying that they will actually try to | 81 // at a later time without worrying that they will actually try to |
| 82 // happen after the lifetime of this object. | 82 // happen after the lifetime of this object. |
| 83 base::WeakPtrFactory<VersionInfoUpdater> weak_pointer_factory_; | 83 base::WeakPtrFactory<VersionInfoUpdater> weak_pointer_factory_; |
| 84 | 84 |
| 85 DISALLOW_COPY_AND_ASSIGN(VersionInfoUpdater); | 85 DISALLOW_COPY_AND_ASSIGN(VersionInfoUpdater); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace chromeos | 88 } // namespace chromeos |
| 89 | 89 |
| 90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_INFO_UPDATER_H_ | 90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_INFO_UPDATER_H_ |
| OLD | NEW |