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

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

Issue 2412133004: arc: Restore broken auth code requst on demand. (Closed)
Patch Set: Created 4 years, 2 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 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void StopAndEnableArc(); 198 void StopAndEnableArc();
199 199
200 // Removes the data if ARC is stopped. Otherwise, queue to remove the data 200 // Removes the data if ARC is stopped. Otherwise, queue to remove the data
201 // on ARC is stopped. 201 // on ARC is stopped.
202 void RemoveArcData(); 202 void RemoveArcData();
203 203
204 // Returns current page that has to be shown in OptIn UI. 204 // Returns current page that has to be shown in OptIn UI.
205 UIPage ui_page() const { return ui_page_; } 205 UIPage ui_page() const { return ui_page_; }
206 206
207 // Returns current page status, relevant to the specific page. 207 // Returns current page status, relevant to the specific page.
208 const base::string16& ui_page_status() { return ui_page_status_; } 208 const base::string16& ui_page_status() const { return ui_page_status_; }
209 209
210 private: 210 private:
211 void StartArc(); 211 void StartArc();
212 void ShowUI(UIPage page, const base::string16& status); 212 void ShowUI(UIPage page, const base::string16& status);
213 void CloseUI(); 213 void CloseUI();
214 void SetUIPage(UIPage page, const base::string16& status); 214 void SetUIPage(UIPage page, const base::string16& status);
215 void SetState(State state); 215 void SetState(State state);
216 void ShutdownBridge(); 216 void ShutdownBridge();
217 void ShutdownBridgeAndCloseUI(); 217 void ShutdownBridgeAndCloseUI();
218 void ShutdownBridgeAndShowUI(UIPage page, const base::string16& status); 218 void ShutdownBridgeAndShowUI(UIPage page, const base::string16& status);
219 void OnOptInPreferenceChanged(); 219 void OnOptInPreferenceChanged();
220 void StartUI(); 220 void StartUI();
221 void StartAndroidManagementClient(); 221 void StartAndroidManagementClient();
222 void CheckAndroidManagement(bool background_mode); 222 void CheckAndroidManagement(bool background_mode);
223 void StartArcIfSignedIn(); 223 void StartArcIfSignedIn();
224 void OnArcDataRemoved(bool success); 224 void OnArcDataRemoved(bool success);
225 void OnArcSignInTimeout(); 225 void OnArcSignInTimeout();
226 bool IsAuthCodeRequest() const;
226 227
227 // Unowned pointer. Keeps current profile. 228 // Unowned pointer. Keeps current profile.
228 Profile* profile_ = nullptr; 229 Profile* profile_ = nullptr;
229 230
230 // Registrar used to monitor ARC enabled state. 231 // Registrar used to monitor ARC enabled state.
231 PrefChangeRegistrar pref_change_registrar_; 232 PrefChangeRegistrar pref_change_registrar_;
232 233
233 mojo::Binding<AuthHost> binding_; 234 mojo::Binding<AuthHost> binding_;
234 State state_ = State::NOT_INITIALIZED; 235 State state_ = State::NOT_INITIALIZED;
235 base::ObserverList<Observer> observer_list_; 236 base::ObserverList<Observer> observer_list_;
(...skipping 18 matching lines...) Expand all
254 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; 255 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_;
255 256
256 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); 257 DISALLOW_COPY_AND_ASSIGN(ArcAuthService);
257 }; 258 };
258 259
259 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); 260 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state);
260 261
261 } // namespace arc 262 } // namespace arc
262 263
263 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 264 #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