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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service.h

Issue 2504583002: Merge provisioning success/error handling. (Closed)
Patch Set: Created 4 years, 1 month 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 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_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <ostream> 9 #include <ostream>
10 #include <string> 10 #include <string>
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 const GetAuthCodeDeprecated0Callback& callback) override; 174 const GetAuthCodeDeprecated0Callback& callback) override;
175 void GetAuthCodeDeprecated( 175 void GetAuthCodeDeprecated(
176 const GetAuthCodeDeprecatedCallback& callback) override; 176 const GetAuthCodeDeprecatedCallback& callback) override;
177 void GetAuthCodeAndAccountTypeDeprecated( 177 void GetAuthCodeAndAccountTypeDeprecated(
178 const GetAuthCodeAndAccountTypeDeprecatedCallback& callback) override; 178 const GetAuthCodeAndAccountTypeDeprecatedCallback& callback) override;
179 // Callback is called with a bool that indicates the management status of the 179 // Callback is called with a bool that indicates the management status of the
180 // user. 180 // user.
181 void GetIsAccountManagedDeprecated( 181 void GetIsAccountManagedDeprecated(
182 const GetIsAccountManagedDeprecatedCallback& callback) override; 182 const GetIsAccountManagedDeprecatedCallback& callback) override;
183 183
184 void OnSignInFailedInternal(ProvisioningResult result);
185
186 // Called from Arc support platform app to set auth code and start arc. 184 // Called from Arc support platform app to set auth code and start arc.
187 void OnAuthCodeObtained(const std::string& auth_code); 185 void OnAuthCodeObtained(const std::string& auth_code);
188 186
189 // Called from Arc support platform app when user cancels signing. 187 // Called from Arc support platform app when user cancels signing.
190 void CancelAuthCode(); 188 void CancelAuthCode();
191 189
192 bool IsArcManaged() const; 190 bool IsArcManaged() const;
193 bool IsArcEnabled() const; 191 bool IsArcEnabled() const;
194 192
195 // This requires Arc to be allowed (|IsAllowed|)for current profile. 193 // This requires Arc to be allowed (|IsAllowed|)for current profile.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 void StopAndEnableArc(); 235 void StopAndEnableArc();
238 236
239 // Removes the data if ARC is stopped. Otherwise, queue to remove the data 237 // Removes the data if ARC is stopped. Otherwise, queue to remove the data
240 // on ARC is stopped. 238 // on ARC is stopped.
241 void RemoveArcData(); 239 void RemoveArcData();
242 240
243 ArcSupportHost* support_host() { return support_host_.get(); } 241 ArcSupportHost* support_host() { return support_host_.get(); }
244 242
245 void StartArc(); 243 void StartArc();
246 244
245 void OnProvisioningFinished(ProvisioningResult result);
Luis Héctor Chávez 2016/11/15 23:40:50 Can this be private?
hidehiko 2016/11/17 11:04:54 In this CL, we can move it to private. However, in
246
247 private: 247 private:
248 using AccountInfoCallback = base::Callback<void(mojom::AccountInfoPtr)>; 248 using AccountInfoCallback = base::Callback<void(mojom::AccountInfoPtr)>;
249 class AccountInfoNotifier; 249 class AccountInfoNotifier;
250 250
251 // TODO(hidehiko): move UI methods/fields to ArcSupportHost. 251 // TODO(hidehiko): move UI methods/fields to ArcSupportHost.
252 void SetState(State state); 252 void SetState(State state);
253 void ShutdownBridge(); 253 void ShutdownBridge();
254 void OnOptInPreferenceChanged(); 254 void OnOptInPreferenceChanged();
255 void StartUI(); 255 void StartUI();
256 void OnAndroidManagementPassed(); 256 void OnAndroidManagementPassed();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); 312 DISALLOW_COPY_AND_ASSIGN(ArcAuthService);
313 }; 313 };
314 314
315 // Outputs the stringified |state| to |os|. This is only for logging purposes. 315 // Outputs the stringified |state| to |os|. This is only for logging purposes.
316 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); 316 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state);
317 317
318 } // namespace arc 318 } // namespace arc
319 319
320 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 320 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_auth_service.cc » ('j') | chrome/browser/chromeos/arc/arc_auth_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698