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

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

Issue 2165643004: arc: add enterprise_reporting.mojom interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved ArcUserDataService to make calls to ArcAuthService Created 4 years, 5 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 void OnSyncedPrefChanged(const std::string& path, bool from_sync) override; 165 void OnSyncedPrefChanged(const std::string& path, bool from_sync) override;
166 166
167 // ArcAuthContextDelegate: 167 // ArcAuthContextDelegate:
168 void OnContextReady() override; 168 void OnContextReady() override;
169 void OnPrepareContextFailed() override; 169 void OnPrepareContextFailed() override;
170 170
171 // ArcAndroidManagementCheckerDelegate: 171 // ArcAndroidManagementCheckerDelegate:
172 void OnAndroidManagementChecked( 172 void OnAndroidManagementChecked(
173 policy::AndroidManagementClient::Result result) override; 173 policy::AndroidManagementClient::Result result) override;
174 174
175 void StopArc();
Luis Héctor Chávez 2016/07/22 15:51:42 nit: add a comment
Polina Bondarenko 2016/07/25 16:17:59 Done.
176
175 // Returns current page that has to be shown in OptIn UI. 177 // Returns current page that has to be shown in OptIn UI.
176 UIPage ui_page() const { return ui_page_; } 178 UIPage ui_page() const { return ui_page_; }
177 179
178 // Returns current page status, relevant to the specific page. 180 // Returns current page status, relevant to the specific page.
179 const base::string16& ui_page_status() { return ui_page_status_; } 181 const base::string16& ui_page_status() { return ui_page_status_; }
180 182
181 private: 183 private:
182 void StartArc(); 184 void StartArc();
183 void ShowUI(UIPage page, const base::string16& status); 185 void ShowUI(UIPage page, const base::string16& status);
184 void CloseUI(); 186 void CloseUI();
185 void SetUIPage(UIPage page, const base::string16& status); 187 void SetUIPage(UIPage page, const base::string16& status);
186 void SetState(State state); 188 void SetState(State state);
187 void ShutdownBridge(); 189 void ShutdownBridge();
188 void ShutdownBridgeAndCloseUI(); 190 void ShutdownBridgeAndCloseUI();
189 void ShutdownBridgeAndShowUI(UIPage page, const base::string16& status); 191 void ShutdownBridgeAndShowUI(UIPage page, const base::string16& status);
190 void OnOptInPreferenceChanged(); 192 void OnOptInPreferenceChanged();
191 void StartUI(); 193 void StartUI();
192 void StartAndroidManagementClient(); 194 void StartAndroidManagementClient();
193 void CheckAndroidManagement(bool background_mode); 195 void CheckAndroidManagement(bool background_mode);
194 void StartArcIfSignedIn(); 196 void StartArcIfSignedIn();
195 void StopArc();
196 197
197 // Unowned pointer. Keeps current profile. 198 // Unowned pointer. Keeps current profile.
198 Profile* profile_ = nullptr; 199 Profile* profile_ = nullptr;
199 200
200 // Registrar used to monitor ARC enabled state. 201 // Registrar used to monitor ARC enabled state.
201 PrefChangeRegistrar pref_change_registrar_; 202 PrefChangeRegistrar pref_change_registrar_;
202 203
203 mojo::Binding<AuthHost> binding_; 204 mojo::Binding<AuthHost> binding_;
204 State state_ = State::NOT_INITIALIZED; 205 State state_ = State::NOT_INITIALIZED;
205 base::ObserverList<Observer> observer_list_; 206 base::ObserverList<Observer> observer_list_;
(...skipping 15 matching lines...) Expand all
221 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; 222 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_;
222 223
223 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); 224 DISALLOW_COPY_AND_ASSIGN(ArcAuthService);
224 }; 225 };
225 226
226 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); 227 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state);
227 228
228 } // namespace arc 229 } // namespace arc
229 230
230 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 231 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698