Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 void HandleGetChannelInfo(const base::ListValue* args); | 101 void HandleGetChannelInfo(const base::ListValue* args); |
| 102 // Callbacks for version_updater_->GetChannel calls. | 102 // Callbacks for version_updater_->GetChannel calls. |
| 103 void OnGetCurrentChannel(std::string callback_id, | 103 void OnGetCurrentChannel(std::string callback_id, |
| 104 const std::string& current_channel); | 104 const std::string& current_channel); |
| 105 void OnGetTargetChannel(std::string callback_id, | 105 void OnGetTargetChannel(std::string callback_id, |
| 106 const std::string& current_channel, | 106 const std::string& current_channel, |
| 107 const std::string& target_channel); | 107 const std::string& target_channel); |
| 108 | 108 |
| 109 // Checks for and applies update, triggered by JS. | 109 // Checks for and applies update, triggered by JS. |
| 110 void HandleRequestUpdate(const base::ListValue* args); | 110 void HandleRequestUpdate(const base::ListValue* args); |
| 111 // Checks for and applies update over cellular connection, triggered by JS. | |
|
xiyuan
2017/05/11 20:37:26
nit: insert an empty line before
weidongg
2017/05/11 23:50:45
Done.
| |
| 112 // Target version and size should be included in the list of arguments. | |
| 113 void HandleRequestUpdateOverCellular(const base::ListValue* args); | |
| 111 | 114 |
| 112 #endif | 115 #endif |
| 113 | 116 |
| 114 // Checks for and applies update. | 117 // Checks for and applies update. |
| 115 void RequestUpdate(); | 118 void RequestUpdate(); |
| 116 | 119 |
| 120 // Checks for and applies update over cellular connection to the given target. | |
| 121 void RequestUpdateOverCellular(std::string& target_version, | |
| 122 int64_t target_size); | |
| 123 | |
| 117 // Callback method which forwards status updates to the page. | 124 // Callback method which forwards status updates to the page. |
| 118 void SetUpdateStatus(VersionUpdater::Status status, | 125 void SetUpdateStatus(VersionUpdater::Status status, |
| 119 int progress, | 126 int progress, |
| 127 const std::string& version, | |
| 128 const int64_t size, | |
| 120 const base::string16& fail_message); | 129 const base::string16& fail_message); |
| 121 | 130 |
| 122 #if defined(OS_MACOSX) | 131 #if defined(OS_MACOSX) |
| 123 // Callback method which forwards promotion state to the page. | 132 // Callback method which forwards promotion state to the page. |
| 124 void SetPromotionState(VersionUpdater::PromotionState state); | 133 void SetPromotionState(VersionUpdater::PromotionState state); |
| 125 #endif | 134 #endif |
| 126 | 135 |
| 127 #if defined(OS_CHROMEOS) | 136 #if defined(OS_CHROMEOS) |
| 128 void HandleGetRegulatoryInfo(const base::ListValue* args); | 137 void HandleGetRegulatoryInfo(const base::ListValue* args); |
| 129 | 138 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 149 | 158 |
| 150 // Used for callbacks. | 159 // Used for callbacks. |
| 151 base::WeakPtrFactory<AboutHandler> weak_factory_; | 160 base::WeakPtrFactory<AboutHandler> weak_factory_; |
| 152 | 161 |
| 153 DISALLOW_COPY_AND_ASSIGN(AboutHandler); | 162 DISALLOW_COPY_AND_ASSIGN(AboutHandler); |
| 154 }; | 163 }; |
| 155 | 164 |
| 156 } // namespace settings | 165 } // namespace settings |
| 157 | 166 |
| 158 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ | 167 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ |
| OLD | NEW |