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

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

Issue 2104893003: Adds a new checkbox for backup and restore in opt-in flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT 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>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "chrome/browser/chromeos/arc/arc_android_management_checker_delegate.h" 15 #include "chrome/browser/chromeos/arc/arc_android_management_checker_delegate.h"
16 #include "chrome/browser/chromeos/arc/arc_auth_context_delegate.h" 16 #include "chrome/browser/chromeos/arc/arc_auth_context_delegate.h"
17 #include "components/arc/arc_bridge_service.h" 17 #include "components/arc/arc_bridge_service.h"
18 #include "components/arc/arc_service.h" 18 #include "components/arc/arc_service.h"
19 #include "components/arc/common/auth.mojom.h" 19 #include "components/arc/common/auth.mojom.h"
20 #include "components/prefs/pref_change_registrar.h" 20 #include "components/prefs/pref_change_registrar.h"
21 #include "components/syncable_prefs/pref_service_syncable_observer.h" 21 #include "components/syncable_prefs/pref_service_syncable_observer.h"
22 #include "components/syncable_prefs/synced_pref_observer.h" 22 #include "components/syncable_prefs/synced_pref_observer.h"
23 #include "mojo/public/cpp/bindings/binding.h" 23 #include "mojo/public/cpp/bindings/binding.h"
24 24
25 class ArcAppLauncher; 25 class ArcAppLauncher;
26 class Profile; 26 class Profile;
27 class ProfileOAuth2TokenService;
xiyuan 2016/06/29 21:36:38 not used?
malaykeshav 2016/06/30 02:46:19 Missed it while merging with ToT. Done
28 class PrefRegistrySimple;
27 29
28 namespace ash { 30 namespace ash {
29 class ShelfDelegate; 31 class ShelfDelegate;
30 } 32 }
31 33
32 namespace user_prefs { 34 namespace user_prefs {
33 class PrefRegistrySyncable; 35 class PrefRegistrySyncable;
34 } 36 }
35 37
36 namespace arc { 38 namespace arc {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 }; 88 };
87 89
88 explicit ArcAuthService(ArcBridgeService* bridge_service); 90 explicit ArcAuthService(ArcBridgeService* bridge_service);
89 ~ArcAuthService() override; 91 ~ArcAuthService() override;
90 92
91 static ArcAuthService* Get(); 93 static ArcAuthService* Get();
92 94
93 // It is called from chrome/browser/prefs/browser_prefs.cc. 95 // It is called from chrome/browser/prefs/browser_prefs.cc.
94 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 96 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
95 97
98 // It is called from chrome/browser/prefs/browser_prefs.cc.
99 static void RegisterPrefs(PrefRegistrySimple* registry);
100
96 static void DisableUIForTesting(); 101 static void DisableUIForTesting();
97 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); 102 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate);
98 103
99 // Checks if OptIn verification was disabled by switch in command line. 104 // Checks if OptIn verification was disabled by switch in command line.
100 static bool IsOptInVerificationDisabled(); 105 static bool IsOptInVerificationDisabled();
101 106
102 static void EnableCheckAndroidManagementForTesting(); 107 static void EnableCheckAndroidManagementForTesting();
103 108
104 // Returns true if Arc is allowed to run for the given profile. 109 // Returns true if Arc is allowed to run for the given profile.
105 static bool IsAllowedForProfile(const Profile* profile); 110 static bool IsAllowedForProfile(const Profile* profile);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_; 217 base::WeakPtrFactory<ArcAuthService> weak_ptr_factory_;
213 218
214 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); 219 DISALLOW_COPY_AND_ASSIGN(ArcAuthService);
215 }; 220 };
216 221
217 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state); 222 std::ostream& operator<<(std::ostream& os, const ArcAuthService::State& state);
218 223
219 } // namespace arc 224 } // namespace arc
220 225
221 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_ 226 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698