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

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

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: Adds a new checkbox for backup and restore in opt-in flow. 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 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 <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/shelf/shelf_delegate.h" 10 #include "ash/shelf/shelf_delegate.h"
(...skipping 25 matching lines...) Expand all
36 #include "chrome/browser/ui/extensions/application_launch.h" 36 #include "chrome/browser/ui/extensions/application_launch.h"
37 #include "chrome/common/pref_names.h" 37 #include "chrome/common/pref_names.h"
38 #include "chrome/grit/generated_resources.h" 38 #include "chrome/grit/generated_resources.h"
39 #include "chromeos/chromeos_switches.h" 39 #include "chromeos/chromeos_switches.h"
40 #include "chromeos/cryptohome/cryptohome_parameters.h" 40 #include "chromeos/cryptohome/cryptohome_parameters.h"
41 #include "chromeos/dbus/dbus_thread_manager.h" 41 #include "chromeos/dbus/dbus_thread_manager.h"
42 #include "chromeos/dbus/session_manager_client.h" 42 #include "chromeos/dbus/session_manager_client.h"
43 #include "components/arc/arc_bridge_service.h" 43 #include "components/arc/arc_bridge_service.h"
44 #include "components/policy/core/browser/browser_policy_connector.h" 44 #include "components/policy/core/browser/browser_policy_connector.h"
45 #include "components/pref_registry/pref_registry_syncable.h" 45 #include "components/pref_registry/pref_registry_syncable.h"
46 #include "components/prefs/pref_registry_simple.h"
46 #include "components/prefs/pref_service.h" 47 #include "components/prefs/pref_service.h"
47 #include "components/signin/core/browser/profile_oauth2_token_service.h" 48 #include "components/signin/core/browser/profile_oauth2_token_service.h"
48 #include "components/signin/core/browser/signin_manager_base.h" 49 #include "components/signin/core/browser/signin_manager_base.h"
49 #include "components/syncable_prefs/pref_service_syncable.h" 50 #include "components/syncable_prefs/pref_service_syncable.h"
50 #include "components/user_manager/user.h" 51 #include "components/user_manager/user.h"
51 #include "content/public/browser/storage_partition.h" 52 #include "content/public/browser/storage_partition.h"
52 #include "content/public/common/url_constants.h" 53 #include "content/public/common/url_constants.h"
53 #include "extensions/browser/app_window/app_window_registry.h" 54 #include "extensions/browser/app_window/app_window_registry.h"
54 #include "extensions/browser/extension_prefs.h" 55 #include "extensions/browser/extension_prefs.h"
55 #include "extensions/browser/extension_registry.h" 56 #include "extensions/browser/extension_registry.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // static 131 // static
131 void ArcAuthService::RegisterProfilePrefs( 132 void ArcAuthService::RegisterProfilePrefs(
132 user_prefs::PrefRegistrySyncable* registry) { 133 user_prefs::PrefRegistrySyncable* registry) {
133 registry->RegisterBooleanPref( 134 registry->RegisterBooleanPref(
134 prefs::kArcEnabled, false, 135 prefs::kArcEnabled, false,
135 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 136 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
136 registry->RegisterBooleanPref(prefs::kArcSignedIn, false); 137 registry->RegisterBooleanPref(prefs::kArcSignedIn, false);
137 } 138 }
138 139
139 // static 140 // static
141 void ArcAuthService::RegisterPrefs(PrefRegistrySimple* registry) {
142 registry->RegisterBooleanPref(prefs::kArcBackupRestoreEnabled, false);
143 }
144
145 // static
140 void ArcAuthService::DisableUIForTesting() { 146 void ArcAuthService::DisableUIForTesting() {
141 disable_ui_for_testing = true; 147 disable_ui_for_testing = true;
142 } 148 }
143 149
144 // static 150 // static
145 void ArcAuthService::SetShelfDelegateForTesting( 151 void ArcAuthService::SetShelfDelegateForTesting(
146 ash::ShelfDelegate* shelf_delegate) { 152 ash::ShelfDelegate* shelf_delegate) {
147 shelf_delegate_for_testing = shelf_delegate; 153 shelf_delegate_for_testing = shelf_delegate;
148 } 154 }
149 155
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 return os << kStateFetchingCode; 779 return os << kStateFetchingCode;
774 case ArcAuthService::State::ACTIVE: 780 case ArcAuthService::State::ACTIVE:
775 return os << kStateActive; 781 return os << kStateActive;
776 default: 782 default:
777 NOTREACHED(); 783 NOTREACHED();
778 return os; 784 return os;
779 } 785 }
780 } 786 }
781 787
782 } // namespace arc 788 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698