Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: chrome/browser/chromeos/mobile/mobile_activator.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MOBILE_MOBILE_ACTIVATOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 11
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "chromeos/network/network_handler_callbacks.h" 18 #include "chromeos/network/network_handler_callbacks.h"
19 #include "chromeos/network/network_state_handler_observer.h" 19 #include "chromeos/network/network_state_handler_observer.h"
20 20
21 namespace base { 21 namespace base {
22 class DictionaryValue; 22 class DictionaryValue;
23 } 23 }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 void DefaultNetworkChanged(const NetworkState* network) override; 166 void DefaultNetworkChanged(const NetworkState* network) override;
167 void NetworkPropertiesUpdated(const NetworkState* network) override; 167 void NetworkPropertiesUpdated(const NetworkState* network) override;
168 168
169 // Continue activation after inital setup (config load). Makes an 169 // Continue activation after inital setup (config load). Makes an
170 // asynchronous call to NetworkConfigurationHandler::GetProperties. 170 // asynchronous call to NetworkConfigurationHandler::GetProperties.
171 void ContinueActivation(); 171 void ContinueActivation();
172 void GetPropertiesAndContinueActivation( 172 void GetPropertiesAndContinueActivation(
173 const std::string& service_path, 173 const std::string& service_path,
174 const base::DictionaryValue& properties); 174 const base::DictionaryValue& properties);
175 void GetPropertiesFailure(const std::string& error_name, 175 void GetPropertiesFailure(const std::string& error_name,
176 scoped_ptr<base::DictionaryValue> error_data); 176 std::unique_ptr<base::DictionaryValue> error_data);
177 // Handles the signal that the payment portal has finished loading. 177 // Handles the signal that the payment portal has finished loading.
178 void HandlePortalLoaded(bool success); 178 void HandlePortalLoaded(bool success);
179 // Handles the signal that the user has finished with the portal. 179 // Handles the signal that the user has finished with the portal.
180 void HandleSetTransactionStatus(bool success); 180 void HandleSetTransactionStatus(bool success);
181 // Starts activation. 181 // Starts activation.
182 void StartActivation(); 182 void StartActivation();
183 // Starts activation over non-cellular network. 183 // Starts activation over non-cellular network.
184 void StartActivationOverNonCellularNetwork(); 184 void StartActivationOverNonCellularNetwork();
185 // Starts OTA activation. 185 // Starts OTA activation.
186 void StartActivationOTA(); 186 void StartActivationOTA();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 std::string* error) const; 226 std::string* error) const;
227 // Sends status updates to WebUI page. 227 // Sends status updates to WebUI page.
228 void UpdatePage(const NetworkState* network, 228 void UpdatePage(const NetworkState* network,
229 const std::string& error_description); 229 const std::string& error_description);
230 230
231 // Callback used to handle an activation error. 231 // Callback used to handle an activation error.
232 void HandleActivationFailure( 232 void HandleActivationFailure(
233 const std::string& service_path, 233 const std::string& service_path,
234 PlanActivationState new_state, 234 PlanActivationState new_state,
235 const std::string& error_name, 235 const std::string& error_name,
236 scoped_ptr<base::DictionaryValue> error_data); 236 std::unique_ptr<base::DictionaryValue> error_data);
237 237
238 // Request cellular activation for |network|. 238 // Request cellular activation for |network|.
239 // On success, |success_callback| will be called. 239 // On success, |success_callback| will be called.
240 // On failure, |error_callback| will be called. 240 // On failure, |error_callback| will be called.
241 virtual void RequestCellularActivation( 241 virtual void RequestCellularActivation(
242 const NetworkState* network, 242 const NetworkState* network,
243 const base::Closure& success_callback, 243 const base::Closure& success_callback,
244 const network_handler::ErrorCallback& error_callback); 244 const network_handler::ErrorCallback& error_callback);
245 245
246 // Changes internal state. 246 // Changes internal state.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 base::ObserverList<Observer> observers_; 321 base::ObserverList<Observer> observers_;
322 base::WeakPtrFactory<MobileActivator> weak_ptr_factory_; 322 base::WeakPtrFactory<MobileActivator> weak_ptr_factory_;
323 323
324 DISALLOW_COPY_AND_ASSIGN(MobileActivator); 324 DISALLOW_COPY_AND_ASSIGN(MobileActivator);
325 }; 325 };
326 326
327 } // namespace chromeos 327 } // namespace chromeos
328 328
329 #endif // CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_ 329 #endif // CHROME_BROWSER_CHROMEOS_MOBILE_MOBILE_ACTIVATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698