From 21d9905a0f3bf0180ed39e4f3113d10da81de7e4 Mon Sep 17 00:00:00 2001 From: "treib@chromium.org" Date: Tue, 24 Jun 2014 11:54:23 +0000 Subject: [PATCH] Rename "managed (mode|user)" to "supervised user" (part 3) Followup to https://codereview.chromium.org/335833003/ and https://codereview.chromium.org/316863002/ This CL renames Managed->SupervisedUserSigninManagerWrapper. Still missing: - Some stuff outside of c/b/supervised_user/, mostly (but not only) c/b/chromeos/login/managed/ - JavaScript - Resource names - The global ENABLE_MANAGED_USERS define TBRing the c/b/sync part since it's just renames. TBR=atwilson@chromium.org BUG=385113 Review URL: https://codereview.chromium.org/335273005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279380 0039d316-1c4b-4281-b951-d872f2087c98 --- .../preferences_private_apitest.cc | 4 ++-- .../permission_request_creator_apiary.cc | 8 ++++---- .../permission_request_creator_apiary.h | 6 +++--- .../permission_request_creator_sync.h | 1 - chrome/browser/sync/backup_rollback_controller.cc | 4 ++-- chrome/browser/sync/backup_rollback_controller.h | 12 ++++++------ .../sync/backup_rollback_controller_unittest.cc | 6 +++--- .../profile_sync_components_factory_impl_unittest.cc | 6 +++--- chrome/browser/sync/profile_sync_service.cc | 4 ++-- chrome/browser/sync/profile_sync_service.h | 6 +++--- chrome/browser/sync/profile_sync_service_factory.cc | 6 +++--- chrome/browser/sync/profile_sync_service_mock.cc | 4 ++-- .../sync/profile_sync_service_startup_unittest.cc | 7 ++++--- chrome/browser/sync/profile_sync_service_unittest.cc | 5 +++-- chrome/browser/sync/startup_controller.cc | 4 ++-- chrome/browser/sync/startup_controller.h | 6 +++--- chrome/browser/sync/startup_controller_unittest.cc | 16 ++++++++-------- ....cc => supervised_user_signin_manager_wrapper.cc} | 14 +++++++------- ...er.h => supervised_user_signin_manager_wrapper.h} | 20 ++++++++++---------- chrome/browser/sync/test_profile_sync_service.cc | 5 +++-- chrome/chrome_browser.gypi | 4 ++-- 21 files changed, 75 insertions(+), 73 deletions(-) rename chrome/browser/sync/{managed_user_signin_manager_wrapper.cc => supervised_user_signin_manager_wrapper.cc} (72%) rename chrome/browser/sync/{managed_user_signin_manager_wrapper.h => supervised_user_signin_manager_wrapper.h} (52%) diff --git a/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc b/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc index 0f33d86a442f..f64288b69cf7 100644 --- a/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc +++ b/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc @@ -19,9 +19,9 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_service_factory.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/browser/ui/browser.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" @@ -44,7 +44,7 @@ class FakeProfileSyncService : public ProfileSyncService { : ProfileSyncService( NULL, profile, - make_scoped_ptr(NULL), + make_scoped_ptr(NULL), ProfileOAuth2TokenServiceFactory::GetForProfile(profile), browser_sync::MANUAL_START), sync_initialized_(true), diff --git a/chrome/browser/supervised_user/permission_request_creator_apiary.cc b/chrome/browser/supervised_user/permission_request_creator_apiary.cc index a590fdb672d3..91f93fc553d1 100644 --- a/chrome/browser/supervised_user/permission_request_creator_apiary.cc +++ b/chrome/browser/supervised_user/permission_request_creator_apiary.cc @@ -14,7 +14,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/chrome_switches.h" #include "components/signin/core/browser/profile_oauth2_token_service.h" #include "components/signin/core/browser/signin_manager.h" @@ -37,7 +37,7 @@ static const char kAuthorizationHeaderFormat[] = "Authorization: Bearer %s"; PermissionRequestCreatorApiary::PermissionRequestCreatorApiary( OAuth2TokenService* oauth2_token_service, - scoped_ptr signin_wrapper, + scoped_ptr signin_wrapper, net::URLRequestContextGetter* context) : OAuth2TokenService::Consumer("permissions_creator"), oauth2_token_service_(oauth2_token_service), @@ -53,8 +53,8 @@ PermissionRequestCreatorApiary::CreateWithProfile(Profile* profile) { ProfileOAuth2TokenService* token_service = ProfileOAuth2TokenServiceFactory::GetForProfile(profile); SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile); - scoped_ptr signin_wrapper( - new ManagedUserSigninManagerWrapper(profile, signin)); + scoped_ptr signin_wrapper( + new SupervisedUserSigninManagerWrapper(profile, signin)); scoped_ptr creator( new PermissionRequestCreatorApiary( token_service, signin_wrapper.Pass(), profile->GetRequestContext())); diff --git a/chrome/browser/supervised_user/permission_request_creator_apiary.h b/chrome/browser/supervised_user/permission_request_creator_apiary.h index 24dd4ccc1d5d..abed986c4f61 100644 --- a/chrome/browser/supervised_user/permission_request_creator_apiary.h +++ b/chrome/browser/supervised_user/permission_request_creator_apiary.h @@ -11,8 +11,8 @@ #include "google_apis/gaia/oauth2_token_service.h" #include "net/url_request/url_fetcher_delegate.h" -class ManagedUserSigninManagerWrapper; class Profile; +class SupervisedUserSigninManagerWrapper; namespace base { class Time; @@ -29,7 +29,7 @@ class PermissionRequestCreatorApiary : public PermissionRequestCreator, public: PermissionRequestCreatorApiary( OAuth2TokenService* oauth2_token_service, - scoped_ptr signin_wrapper, + scoped_ptr signin_wrapper, net::URLRequestContextGetter* context); virtual ~PermissionRequestCreatorApiary(); @@ -59,7 +59,7 @@ class PermissionRequestCreatorApiary : public PermissionRequestCreator, void DispatchGoogleServiceAuthError(const GoogleServiceAuthError& error); OAuth2TokenService* oauth2_token_service_; - scoped_ptr signin_wrapper_; + scoped_ptr signin_wrapper_; base::Closure callback_; net::URLRequestContextGetter* context_; std::string url_requested_; diff --git a/chrome/browser/supervised_user/permission_request_creator_sync.h b/chrome/browser/supervised_user/permission_request_creator_sync.h index 196423dcef75..2352aaa9eb4e 100644 --- a/chrome/browser/supervised_user/permission_request_creator_sync.h +++ b/chrome/browser/supervised_user/permission_request_creator_sync.h @@ -11,7 +11,6 @@ class SupervisedUserSettingsService; class SupervisedUserSharedSettingsService; -class ManagedUserSigninManagerWrapper; class PermissionRequestCreatorSync : public PermissionRequestCreator { public: diff --git a/chrome/browser/sync/backup_rollback_controller.cc b/chrome/browser/sync/backup_rollback_controller.cc index c7018e395357..97cf19372954 100644 --- a/chrome/browser/sync/backup_rollback_controller.cc +++ b/chrome/browser/sync/backup_rollback_controller.cc @@ -6,7 +6,7 @@ #include "base/command_line.h" #include "base/message_loop/message_loop.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/chrome_switches.h" #include "components/sync_driver/sync_prefs.h" @@ -19,7 +19,7 @@ static const int kRollbackLimits = 3; BackupRollbackController::BackupRollbackController( sync_driver::SyncPrefs* sync_prefs, - const ManagedUserSigninManagerWrapper* signin, + const SupervisedUserSigninManagerWrapper* signin, base::Closure start_backup, base::Closure start_rollback) : sync_prefs_(sync_prefs), diff --git a/chrome/browser/sync/backup_rollback_controller.h b/chrome/browser/sync/backup_rollback_controller.h index 5a3cd5e48f38..f4887a992bec 100644 --- a/chrome/browser/sync/backup_rollback_controller.h +++ b/chrome/browser/sync/backup_rollback_controller.h @@ -8,7 +8,7 @@ #include "base/callback.h" #include "base/memory/weak_ptr.h" -class ManagedUserSigninManagerWrapper; +class SupervisedUserSigninManagerWrapper; namespace sync_driver { class SyncPrefs; @@ -23,7 +23,7 @@ namespace browser_sync { class BackupRollbackController { public: BackupRollbackController(sync_driver::SyncPrefs* sync_prefs, - const ManagedUserSigninManagerWrapper* signin, + const SupervisedUserSigninManagerWrapper* signin, base::Closure start_backup, base::Closure start_rollback); ~BackupRollbackController(); @@ -45,10 +45,10 @@ class BackupRollbackController { sync_driver::SyncPrefs* sync_prefs_; - // Use ManagedUserSigninManagerWrapper instead of SigninManagerBase because - // SigninManagerBase could return non-empty user name for managed user, which - // would cause backup to trumpet normal sync for managed user. - const ManagedUserSigninManagerWrapper* signin_; + // Use SupervisedUserSigninManagerWrapper instead of SigninManagerBase because + // SigninManagerBase could return non-empty user name for supervised user, + // which would cause backup to trumpet normal sync for supervised user. + const SupervisedUserSigninManagerWrapper* signin_; base::Closure start_backup_; base::Closure start_rollback_; diff --git a/chrome/browser/sync/backup_rollback_controller_unittest.cc b/chrome/browser/sync/backup_rollback_controller_unittest.cc index 0176cbb118db..e69be7fda689 100644 --- a/chrome/browser/sync/backup_rollback_controller_unittest.cc +++ b/chrome/browser/sync/backup_rollback_controller_unittest.cc @@ -7,7 +7,7 @@ #include "base/command_line.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/chrome_switches.h" #include "components/sync_driver/sync_prefs.h" #include "testing/gmock/include/gmock/gmock.h" @@ -19,9 +19,9 @@ namespace { #if defined(ENABLE_PRE_SYNC_BACKUP) -class MockSigninManagerWrapper : public ManagedUserSigninManagerWrapper { +class MockSigninManagerWrapper : public SupervisedUserSigninManagerWrapper { public: - MockSigninManagerWrapper() : ManagedUserSigninManagerWrapper(NULL, NULL) {} + MockSigninManagerWrapper() : SupervisedUserSigninManagerWrapper(NULL, NULL) {} MOCK_CONST_METHOD0(GetEffectiveUsername, std::string()); }; diff --git a/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc b/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc index f89c7347a547..a6603859a498 100644 --- a/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc +++ b/chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc @@ -9,10 +9,10 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" #include "chrome/browser/sync/profile_sync_components_factory_impl.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_service_factory.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_version_info.h" #include "chrome/test/base/testing_profile.h" @@ -116,7 +116,7 @@ class ProfileSyncComponentsFactoryImplTest : public testing::Test { token_service, profile_->GetRequestContext()), profile_.get(), - make_scoped_ptr(NULL), + make_scoped_ptr(NULL), token_service, browser_sync::MANUAL_START)); pss->factory()->RegisterDataTypes(pss.get()); @@ -145,7 +145,7 @@ TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDefault) { token_service, profile_->GetRequestContext()), profile_.get(), - make_scoped_ptr(NULL), + make_scoped_ptr(NULL), token_service, browser_sync::MANUAL_START)); pss->factory()->RegisterDataTypes(pss.get()); diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index e0c710892492..0cace5cef1db 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -48,10 +48,10 @@ #include "chrome/browser/sync/glue/sync_start_util.h" #include "chrome/browser/sync/glue/synced_device_tracker.h" #include "chrome/browser/sync/glue/typed_url_data_type_controller.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" #include "chrome/browser/sync/profile_sync_components_factory_impl.h" #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" #include "chrome/browser/sync/sessions/sessions_sync_manager.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/browser/sync/sync_error_controller.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" @@ -186,7 +186,7 @@ bool ShouldShowActionOnUI( ProfileSyncService::ProfileSyncService( ProfileSyncComponentsFactory* factory, Profile* profile, - scoped_ptr signin_wrapper, + scoped_ptr signin_wrapper, ProfileOAuth2TokenService* oauth2_token_service, ProfileSyncServiceStartBehavior start_behavior) : OAuth2TokenService::Consumer("sync"), diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index 0325d0d15e98..bd113766afe1 100644 --- a/chrome/browser/sync/profile_sync_service.h +++ b/chrome/browser/sync/profile_sync_service.h @@ -50,10 +50,10 @@ #include "sync/js/sync_js_controller.h" #include "url/gurl.h" -class ManagedUserSigninManagerWrapper; class Profile; class ProfileOAuth2TokenService; class ProfileSyncComponentsFactory; +class SupervisedUserSigninManagerWrapper; class SyncErrorController; namespace base { @@ -267,7 +267,7 @@ class ProfileSyncService : public ProfileSyncServiceBase, ProfileSyncService( ProfileSyncComponentsFactory* factory, Profile* profile, - scoped_ptr signin_wrapper, + scoped_ptr signin_wrapper, ProfileOAuth2TokenService* oauth2_token_service, browser_sync::ProfileSyncServiceStartBehavior start_behavior); virtual ~ProfileSyncService(); @@ -999,7 +999,7 @@ class ProfileSyncService : public ProfileSyncServiceBase, // Encapsulates user signin - used to set/get the user's authenticated // email address. - const scoped_ptr signin_; + const scoped_ptr signin_; // Information describing an unrecoverable error. UnrecoverableErrorReason unrecoverable_error_reason_; diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc index 4a9f487a49db..60f72b51cbf7 100644 --- a/chrome/browser/sync/profile_sync_service_factory.cc +++ b/chrome/browser/sync/profile_sync_service_factory.cc @@ -21,10 +21,10 @@ #include "chrome/browser/signin/about_signin_internals_factory.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" #include "chrome/browser/sync/profile_sync_components_factory_impl.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/startup_controller.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/global_error/global_error_service_factory.h" #include "chrome/browser/webdata/web_data_service_factory.h" @@ -105,8 +105,8 @@ KeyedService* ProfileSyncServiceFactory::BuildServiceInstanceFor( const GURL sync_service_url = ProfileSyncService::GetSyncServiceURL(*CommandLine::ForCurrentProcess()); - scoped_ptr signin_wrapper( - new ManagedUserSigninManagerWrapper(profile, signin)); + scoped_ptr signin_wrapper( + new SupervisedUserSigninManagerWrapper(profile, signin)); std::string account_id = signin_wrapper->GetAccountIdToUse(); OAuth2TokenService::ScopeSet scope_set; scope_set.insert(signin_wrapper->GetSyncScopeToUse()); diff --git a/chrome/browser/sync/profile_sync_service_mock.cc b/chrome/browser/sync/profile_sync_service_mock.cc index 8470bca076ee..3ab3903c8b65 100644 --- a/chrome/browser/sync/profile_sync_service_mock.cc +++ b/chrome/browser/sync/profile_sync_service_mock.cc @@ -8,7 +8,7 @@ #include "base/prefs/testing_pref_store.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/testing_profile.h" @@ -19,7 +19,7 @@ ProfileSyncServiceMock::ProfileSyncServiceMock(Profile* profile) : ProfileSyncService( NULL, profile, - make_scoped_ptr(new ManagedUserSigninManagerWrapper( + make_scoped_ptr(new SupervisedUserSigninManagerWrapper( profile, SigninManagerFactory::GetForProfile(profile))), ProfileOAuth2TokenServiceFactory::GetForProfile(profile), diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc index 85c211cbd4a2..91ed7f8413ef 100644 --- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc @@ -13,10 +13,10 @@ #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/browser/sync/glue/sync_backend_host_mock.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" #include "chrome/browser/sync/profile_sync_components_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/sync/profile_sync_test_util.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" @@ -101,7 +101,7 @@ class ProfileSyncServiceStartupTest : public testing::Test { return new ProfileSyncService( new ProfileSyncComponentsFactoryMock(), profile, - make_scoped_ptr(new ManagedUserSigninManagerWrapper( + make_scoped_ptr(new SupervisedUserSigninManagerWrapper( profile, SigninManagerFactory::GetForProfile(profile))), ProfileOAuth2TokenServiceFactory::GetForProfile(profile), browser_sync::MANUAL_START); @@ -185,7 +185,8 @@ class ProfileSyncServiceStartupCrosTest : public ProfileSyncServiceStartupTest { return new ProfileSyncService( new ProfileSyncComponentsFactoryMock(), profile, - make_scoped_ptr(new ManagedUserSigninManagerWrapper(profile, signin)), + make_scoped_ptr(new SupervisedUserSigninManagerWrapper(profile, + signin)), oauth2_token_service, browser_sync::AUTO_START); } diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc index 8b5fa2a03e07..8e80aa22ca29 100644 --- a/chrome/browser/sync/profile_sync_service_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_unittest.cc @@ -16,8 +16,8 @@ #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/browser/sync/glue/sync_backend_host_mock.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" #include "chrome/browser/sync/profile_sync_components_factory_mock.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" @@ -196,7 +196,8 @@ class ProfileSyncServiceTest : public ::testing::Test { service_.reset(new ProfileSyncService( components_factory_, profile_, - make_scoped_ptr(new ManagedUserSigninManagerWrapper(profile_, signin)), + make_scoped_ptr(new SupervisedUserSigninManagerWrapper(profile_, + signin)), oauth2_token_service, behavior)); service_->SetClearingBrowseringDataForTesting( diff --git a/chrome/browser/sync/startup_controller.cc b/chrome/browser/sync/startup_controller.cc index db337a3bef87..71cfcdc61214 100644 --- a/chrome/browser/sync/startup_controller.cc +++ b/chrome/browser/sync/startup_controller.cc @@ -8,7 +8,7 @@ #include "base/message_loop/message_loop.h" #include "base/metrics/histogram.h" #include "base/strings/string_number_conversions.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/chrome_switches.h" #include "components/signin/core/browser/profile_oauth2_token_service.h" #include "components/sync_driver/sync_prefs.h" @@ -38,7 +38,7 @@ StartupController::StartupController( ProfileSyncServiceStartBehavior start_behavior, const ProfileOAuth2TokenService* token_service, const sync_driver::SyncPrefs* sync_prefs, - const ManagedUserSigninManagerWrapper* signin, + const SupervisedUserSigninManagerWrapper* signin, base::Closure start_backend) : received_start_request_(false), setup_in_progress_(false), diff --git a/chrome/browser/sync/startup_controller.h b/chrome/browser/sync/startup_controller.h index 9a7aa92adc36..1c6749dc55b0 100644 --- a/chrome/browser/sync/startup_controller.h +++ b/chrome/browser/sync/startup_controller.h @@ -10,8 +10,8 @@ #include "base/time/time.h" #include "sync/internal_api/public/base/model_type.h" -class ManagedUserSigninManagerWrapper; class ProfileOAuth2TokenService; +class SupervisedUserSigninManagerWrapper; namespace sync_driver { class SyncPrefs; @@ -38,7 +38,7 @@ class StartupController { StartupController(ProfileSyncServiceStartBehavior start_behavior, const ProfileOAuth2TokenService* token_service, const sync_driver::SyncPrefs* sync_prefs, - const ManagedUserSigninManagerWrapper* signin, + const SupervisedUserSigninManagerWrapper* signin, base::Closure start_backend); ~StartupController(); @@ -107,7 +107,7 @@ class StartupController { const ProfileOAuth2TokenService* token_service_; - const ManagedUserSigninManagerWrapper* signin_; + const SupervisedUserSigninManagerWrapper* signin_; // The callback we invoke when it's time to call expensive // startup routines for the sync backend. diff --git a/chrome/browser/sync/startup_controller_unittest.cc b/chrome/browser/sync/startup_controller_unittest.cc index 42ef53077a55..63a22cf0af7c 100644 --- a/chrome/browser/sync/startup_controller_unittest.cc +++ b/chrome/browser/sync/startup_controller_unittest.cc @@ -12,7 +12,7 @@ #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/testing_profile.h" #include "components/sync_driver/sync_prefs.h" @@ -31,11 +31,11 @@ static const char kStateStringStarted[] = "Started"; static const char kStateStringDeferred[] = "Deferred"; static const char kStateStringNotStarted[] = "Not started"; -class FakeManagedUserSigninManagerWrapper - : public ManagedUserSigninManagerWrapper { +class FakeSupervisedUserSigninManagerWrapper + : public SupervisedUserSigninManagerWrapper { public: - FakeManagedUserSigninManagerWrapper() - : ManagedUserSigninManagerWrapper(NULL, NULL) {} + FakeSupervisedUserSigninManagerWrapper() + : SupervisedUserSigninManagerWrapper(NULL, NULL) {} virtual std::string GetEffectiveUsername() const OVERRIDE { return account_; } @@ -59,7 +59,7 @@ class StartupControllerTest : public testing::Test { sync_prefs_.reset(new sync_driver::SyncPrefs(profile_->GetPrefs())); token_service_.reset(static_cast( BuildFakeProfileOAuth2TokenService(profile_.get()))); - signin_.reset(new FakeManagedUserSigninManagerWrapper()); + signin_.reset(new FakeSupervisedUserSigninManagerWrapper()); ProfileSyncServiceStartBehavior behavior = browser_defaults::kSyncAutoStarts ? AUTO_START : MANUAL_START; @@ -89,7 +89,7 @@ class StartupControllerTest : public testing::Test { bool started() const { return started_; } void clear_started() { started_ = false; } StartupController* controller() { return controller_.get(); } - FakeManagedUserSigninManagerWrapper* signin() { return signin_.get(); } + FakeSupervisedUserSigninManagerWrapper* signin() { return signin_.get(); } FakeProfileOAuth2TokenService* token_service() { return token_service_.get(); } @@ -100,7 +100,7 @@ class StartupControllerTest : public testing::Test { bool started_; base::MessageLoop message_loop_; scoped_ptr controller_; - scoped_ptr signin_; + scoped_ptr signin_; scoped_ptr token_service_; scoped_ptr sync_prefs_; scoped_ptr profile_; diff --git a/chrome/browser/sync/managed_user_signin_manager_wrapper.cc b/chrome/browser/sync/supervised_user_signin_manager_wrapper.cc similarity index 72% rename from chrome/browser/sync/managed_user_signin_manager_wrapper.cc rename to chrome/browser/sync/supervised_user_signin_manager_wrapper.cc index 13a8ce084af6..9abdc9a0cacf 100644 --- a/chrome/browser/sync/managed_user_signin_manager_wrapper.cc +++ b/chrome/browser/sync/supervised_user_signin_manager_wrapper.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/browser/profiles/profile.h" #include "components/signin/core/browser/signin_manager_base.h" @@ -12,19 +12,19 @@ #include "chrome/browser/supervised_user/supervised_user_constants.h" #endif -ManagedUserSigninManagerWrapper::ManagedUserSigninManagerWrapper( +SupervisedUserSigninManagerWrapper::SupervisedUserSigninManagerWrapper( Profile* profile, SigninManagerBase* original) : profile_(profile), original_(original) {} -ManagedUserSigninManagerWrapper::~ManagedUserSigninManagerWrapper() { +SupervisedUserSigninManagerWrapper::~SupervisedUserSigninManagerWrapper() { } -SigninManagerBase* ManagedUserSigninManagerWrapper::GetOriginal() { +SigninManagerBase* SupervisedUserSigninManagerWrapper::GetOriginal() { return original_; } -std::string ManagedUserSigninManagerWrapper::GetEffectiveUsername() const { +std::string SupervisedUserSigninManagerWrapper::GetEffectiveUsername() const { const std::string& auth_username = original_->GetAuthenticatedUsername(); #if defined(ENABLE_MANAGED_USERS) if (auth_username.empty() && profile_->IsSupervised()) @@ -33,7 +33,7 @@ std::string ManagedUserSigninManagerWrapper::GetEffectiveUsername() const { return auth_username; } -std::string ManagedUserSigninManagerWrapper::GetAccountIdToUse() const { +std::string SupervisedUserSigninManagerWrapper::GetAccountIdToUse() const { const std::string& auth_account = original_->GetAuthenticatedAccountId(); #if defined(ENABLE_MANAGED_USERS) if (auth_account.empty() && profile_->IsSupervised()) @@ -42,7 +42,7 @@ std::string ManagedUserSigninManagerWrapper::GetAccountIdToUse() const { return auth_account; } -std::string ManagedUserSigninManagerWrapper::GetSyncScopeToUse() const { +std::string SupervisedUserSigninManagerWrapper::GetSyncScopeToUse() const { #if defined(ENABLE_MANAGED_USERS) const std::string& auth_account = original_->GetAuthenticatedAccountId(); if (auth_account.empty() && profile_->IsSupervised()) diff --git a/chrome/browser/sync/managed_user_signin_manager_wrapper.h b/chrome/browser/sync/supervised_user_signin_manager_wrapper.h similarity index 52% rename from chrome/browser/sync/managed_user_signin_manager_wrapper.h rename to chrome/browser/sync/supervised_user_signin_manager_wrapper.h index 059d0fe35be8..afe8a132cf75 100644 --- a/chrome/browser/sync/managed_user_signin_manager_wrapper.h +++ b/chrome/browser/sync/supervised_user_signin_manager_wrapper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SYNC_MANAGED_USER_SIGNIN_MANAGER_WRAPPER_H_ -#define CHROME_BROWSER_SYNC_MANAGED_USER_SIGNIN_MANAGER_WRAPPER_H_ +#ifndef CHROME_BROWSER_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ +#define CHROME_BROWSER_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ #include @@ -12,16 +12,16 @@ class Profile; class SigninManagerBase; -// Some chrome cloud services support managed users as well as normally +// Some chrome cloud services support supervised users as well as normally // authenticated users that sign in through SigninManager. To facilitate // getting the "effective" username and account identifiers, services can -// use this class to wrap the SigninManager and return managed user account +// use this class to wrap the SigninManager and return supervised user account // information when appropriate. -class ManagedUserSigninManagerWrapper { +class SupervisedUserSigninManagerWrapper { public: - ManagedUserSigninManagerWrapper(Profile* profile, - SigninManagerBase* original); - virtual ~ManagedUserSigninManagerWrapper(); + SupervisedUserSigninManagerWrapper(Profile* profile, + SigninManagerBase* original); + virtual ~SupervisedUserSigninManagerWrapper(); virtual std::string GetEffectiveUsername() const; virtual std::string GetAccountIdToUse() const; @@ -33,7 +33,7 @@ class ManagedUserSigninManagerWrapper { private: Profile* profile_; SigninManagerBase* original_; - DISALLOW_COPY_AND_ASSIGN(ManagedUserSigninManagerWrapper); + DISALLOW_COPY_AND_ASSIGN(SupervisedUserSigninManagerWrapper); }; -#endif // CHROME_BROWSER_SYNC_MANAGED_USER_SIGNIN_MANAGER_WRAPPER_H_ +#endif // CHROME_BROWSER_SYNC_SUPERVISED_USER_SIGNIN_MANAGER_WRAPPER_H_ diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc index 17eceb459086..20026f51bd4e 100644 --- a/chrome/browser/sync/test_profile_sync_service.cc +++ b/chrome/browser/sync/test_profile_sync_service.cc @@ -11,10 +11,10 @@ #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/browser/sync/glue/sync_backend_host.h" #include "chrome/browser/sync/glue/sync_backend_host_core.h" -#include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" #include "chrome/browser/sync/profile_sync_components_factory.h" #include "chrome/browser/sync/profile_sync_components_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_factory.h" +#include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" #include "chrome/browser/sync/test/test_http_bridge_factory.h" #include "components/invalidation/profile_invalidation_provider.h" #include "components/signin/core/browser/signin_manager.h" @@ -109,7 +109,8 @@ TestProfileSyncService::TestProfileSyncService( : ProfileSyncService( factory, profile, - make_scoped_ptr(new ManagedUserSigninManagerWrapper(profile, signin)), + make_scoped_ptr(new SupervisedUserSigninManagerWrapper(profile, + signin)), oauth2_token_service, behavior) { SetSyncSetupCompleted(); diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index f06377f350ad..a8fa7d90507b 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2280,8 +2280,6 @@ 'browser/sync/glue/typed_url_model_associator.h', 'browser/sync/glue/ui_model_worker.cc', 'browser/sync/glue/ui_model_worker.h', - 'browser/sync/managed_user_signin_manager_wrapper.cc', - 'browser/sync/managed_user_signin_manager_wrapper.h', 'browser/sync/profile_sync_auth_provider.cc', 'browser/sync/profile_sync_auth_provider.h', 'browser/sync/profile_sync_components_factory.h', @@ -2314,6 +2312,8 @@ 'browser/sync/sessions/tab_node_pool.h', 'browser/sync/startup_controller.cc', 'browser/sync/startup_controller.h', + 'browser/sync/supervised_user_signin_manager_wrapper.cc', + 'browser/sync/supervised_user_signin_manager_wrapper.h', 'browser/sync/sync_error_controller.cc', 'browser/sync/sync_error_controller.h', 'browser/sync/sync_error_notifier_ash.cc', -- 2.11.4.GIT