OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/shelf/shelf_delegate.h" | 9 #include "ash/shelf/shelf_delegate.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 22 matching lines...) Expand all Loading... | |
33 #include "chrome/browser/ui/extensions/application_launch.h" | 33 #include "chrome/browser/ui/extensions/application_launch.h" |
34 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
35 #include "chrome/grit/generated_resources.h" | 35 #include "chrome/grit/generated_resources.h" |
36 #include "chromeos/chromeos_switches.h" | 36 #include "chromeos/chromeos_switches.h" |
37 #include "chromeos/cryptohome/cryptohome_parameters.h" | 37 #include "chromeos/cryptohome/cryptohome_parameters.h" |
38 #include "chromeos/dbus/dbus_thread_manager.h" | 38 #include "chromeos/dbus/dbus_thread_manager.h" |
39 #include "chromeos/dbus/session_manager_client.h" | 39 #include "chromeos/dbus/session_manager_client.h" |
40 #include "components/arc/arc_bridge_service.h" | 40 #include "components/arc/arc_bridge_service.h" |
41 #include "components/policy/core/browser/browser_policy_connector.h" | 41 #include "components/policy/core/browser/browser_policy_connector.h" |
42 #include "components/pref_registry/pref_registry_syncable.h" | 42 #include "components/pref_registry/pref_registry_syncable.h" |
43 #include "components/prefs/pref_registry_simple.h" | |
43 #include "components/prefs/pref_service.h" | 44 #include "components/prefs/pref_service.h" |
44 #include "components/syncable_prefs/pref_service_syncable.h" | 45 #include "components/syncable_prefs/pref_service_syncable.h" |
45 #include "components/user_manager/user.h" | 46 #include "components/user_manager/user.h" |
46 #include "extensions/browser/app_window/app_window_registry.h" | 47 #include "extensions/browser/app_window/app_window_registry.h" |
47 #include "extensions/browser/extension_prefs.h" | 48 #include "extensions/browser/extension_prefs.h" |
48 #include "extensions/browser/extension_registry.h" | 49 #include "extensions/browser/extension_registry.h" |
49 #include "ui/base/l10n/l10n_util.h" | 50 #include "ui/base/l10n/l10n_util.h" |
50 | 51 |
51 namespace arc { | 52 namespace arc { |
52 | 53 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 // static | 123 // static |
123 void ArcAuthService::RegisterProfilePrefs( | 124 void ArcAuthService::RegisterProfilePrefs( |
124 user_prefs::PrefRegistrySyncable* registry) { | 125 user_prefs::PrefRegistrySyncable* registry) { |
125 registry->RegisterBooleanPref( | 126 registry->RegisterBooleanPref( |
126 prefs::kArcEnabled, false, | 127 prefs::kArcEnabled, false, |
127 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 128 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
128 registry->RegisterBooleanPref(prefs::kArcSignedIn, false); | 129 registry->RegisterBooleanPref(prefs::kArcSignedIn, false); |
129 } | 130 } |
130 | 131 |
131 // static | 132 // static |
133 void ArcAuthService::RegisterPrefs(PrefRegistrySimple* registry) { | |
134 registry->RegisterBooleanPref(prefs::kArcBackupRestoreEnabled, false); | |
xiyuan
2016/06/29 21:36:38
Think this should be part of user prefs and we sho
| |
135 } | |
136 | |
137 // static | |
132 void ArcAuthService::DisableUIForTesting() { | 138 void ArcAuthService::DisableUIForTesting() { |
133 disable_ui_for_testing = true; | 139 disable_ui_for_testing = true; |
134 } | 140 } |
135 | 141 |
136 // static | 142 // static |
137 void ArcAuthService::SetShelfDelegateForTesting( | 143 void ArcAuthService::SetShelfDelegateForTesting( |
138 ash::ShelfDelegate* shelf_delegate) { | 144 ash::ShelfDelegate* shelf_delegate) { |
139 shelf_delegate_for_testing = shelf_delegate; | 145 shelf_delegate_for_testing = shelf_delegate; |
140 } | 146 } |
141 | 147 |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
721 return os << kStateFetchingCode; | 727 return os << kStateFetchingCode; |
722 case ArcAuthService::State::ACTIVE: | 728 case ArcAuthService::State::ACTIVE: |
723 return os << kStateActive; | 729 return os << kStateActive; |
724 default: | 730 default: |
725 NOTREACHED(); | 731 NOTREACHED(); |
726 return os; | 732 return os; |
727 } | 733 } |
728 } | 734 } |
729 | 735 |
730 } // namespace arc | 736 } // namespace arc |
OLD | NEW |