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

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

Issue 2209173002: Migrate ArcUserDataService into ArcAuthService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added more comments. Created 4 years, 4 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void OnContextReady() override; 174 void OnContextReady() override;
175 void OnPrepareContextFailed() override; 175 void OnPrepareContextFailed() override;
176 176
177 // ArcAndroidManagementCheckerDelegate: 177 // ArcAndroidManagementCheckerDelegate:
178 void OnAndroidManagementChecked( 178 void OnAndroidManagementChecked(
179 policy::AndroidManagementClient::Result result) override; 179 policy::AndroidManagementClient::Result result) override;
180 180
181 // Stops ARC without changing ArcEnabled preference. 181 // Stops ARC without changing ArcEnabled preference.
182 void StopArc(); 182 void StopArc();
183 183
184 // If arc is running, StopArc(), then StartArc(). Between them
185 // data clear may happens.
186 void ReenableArc();
Luis Héctor Chávez 2016/08/09 16:40:02 How about calling this "RestartArc()"? Also, the d
hidehiko 2016/08/10 05:41:19 Can we keep the name? The comment was wrong and fi
187
188 // Removes the data if ARC is stopped. Otherwise, queue to remove the data
189 // on ARC is stopped.
190 void RemoveArcData();
Luis Héctor Chávez 2016/08/09 16:40:02 How about to make this less confusing, call this "
hidehiko 2016/08/10 05:41:19 This does not actually "schedule" but remove the d
191 void OnArcDataRemoved(bool success);
khmel 2016/08/09 15:23:11 it seems, it can be private
hidehiko 2016/08/10 05:41:19 Done.
192
184 // Returns current page that has to be shown in OptIn UI. 193 // Returns current page that has to be shown in OptIn UI.
185 UIPage ui_page() const { return ui_page_; } 194 UIPage ui_page() const { return ui_page_; }
186 195
187 // Returns current page status, relevant to the specific page. 196 // Returns current page status, relevant to the specific page.
188 const base::string16& ui_page_status() { return ui_page_status_; } 197 const base::string16& ui_page_status() { return ui_page_status_; }
189 198
190 private: 199 private:
191 void StartArc(); 200 void StartArc();
192 void ShowUI(UIPage page, const base::string16& status); 201 void ShowUI(UIPage page, const base::string16& status);
193 void CloseUI(); 202 void CloseUI();
(...skipping 18 matching lines...) Expand all
212 State state_ = State::NOT_INITIALIZED; 221 State state_ = State::NOT_INITIALIZED;
213 base::ObserverList<Observer> observer_list_; 222 base::ObserverList<Observer> observer_list_;
214 std::unique_ptr<ArcAppLauncher> playstore_launcher_; 223 std::unique_ptr<ArcAppLauncher> playstore_launcher_;
215 std::string auth_code_; 224 std::string auth_code_;
216 GetAuthCodeCallback auth_callback_; 225 GetAuthCodeCallback auth_callback_;
217 bool initial_opt_in_ = false; 226 bool initial_opt_in_ = false;
218 bool disable_arc_from_ui_ = false; 227 bool disable_arc_from_ui_ = false;
219 UIPage ui_page_ = UIPage::NO_PAGE; 228 UIPage ui_page_ = UIPage::NO_PAGE;
220 base::string16 ui_page_status_; 229 base::string16 ui_page_status_;
221 bool clear_required_ = false; 230 bool clear_required_ = false;
231 bool reenable_arc_ = false;
222 bool waiting_for_reply_ = false; 232 bool waiting_for_reply_ = false;
223 233
224 std::unique_ptr<ArcAuthContext> context_; 234 std::unique_ptr<ArcAuthContext> context_;
225 std::unique_ptr<ArcAndroidManagementChecker> android_management_checker_; 235 std::unique_ptr<ArcAndroidManagementChecker> android_management_checker_;
226 236
227 base::Time sign_in_time_; 237 base::Time sign_in_time_;
228 238
229 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; 239 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_;
230 240
231 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); 241 DISALLOW_COPY_AND_ASSIGN(ArcAuthService);
232 }; 242 };
233 243
234 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); 244 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state);
235 245
236 } // namespace arc 246 } // namespace arc
237 247
238 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 248 #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