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

Side by Side Diff: chrome/browser/extensions/extension_service_test_base.cc

Issue 316863002: Rename "managed (mode|user)" to "supervised user" (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/extension_service_test_base.h" 5 #include "chrome/browser/extensions/extension_service_test_base.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 factory.SetUserPrefsFile(params.pref_file, 45 factory.SetUserPrefsFile(params.pref_file,
46 base::MessageLoopProxy::current().get()); 46 base::MessageLoopProxy::current().get());
47 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( 47 scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
48 new user_prefs::PrefRegistrySyncable); 48 new user_prefs::PrefRegistrySyncable);
49 scoped_ptr<PrefServiceSyncable> prefs( 49 scoped_ptr<PrefServiceSyncable> prefs(
50 factory.CreateSyncable(registry.get())); 50 factory.CreateSyncable(registry.get()));
51 chrome::RegisterUserProfilePrefs(registry.get()); 51 chrome::RegisterUserProfilePrefs(registry.get());
52 profile_builder.SetPrefService(prefs.Pass()); 52 profile_builder.SetPrefService(prefs.Pass());
53 } 53 }
54 54
55 if (params.profile_is_managed) 55 if (params.profile_is_supervised)
56 profile_builder.SetManagedUserId("asdf"); 56 profile_builder.SetSupervisedUserId("asdf");
57 57
58 profile_builder.SetPath(params.profile_path); 58 profile_builder.SetPath(params.profile_path);
59 return profile_builder.Build(); 59 return profile_builder.Build();
60 } 60 }
61 61
62 } // namespace 62 } // namespace
63 63
64 ExtensionServiceTestBase::ExtensionServiceInitParams:: 64 ExtensionServiceTestBase::ExtensionServiceInitParams::
65 ExtensionServiceInitParams() 65 ExtensionServiceInitParams()
66 : autoupdate_enabled(false), is_first_run(true), profile_is_managed(false) { 66 : autoupdate_enabled(false),
67 is_first_run(true),
68 profile_is_supervised(false) {
67 } 69 }
68 70
69 // Our message loop may be used in tests which require it to be an IO loop. 71 // Our message loop may be used in tests which require it to be an IO loop.
70 ExtensionServiceTestBase::ExtensionServiceTestBase() 72 ExtensionServiceTestBase::ExtensionServiceTestBase()
71 : service_(NULL), 73 : service_(NULL),
72 thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), 74 thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
73 registry_(NULL) { 75 registry_(NULL) {
74 base::FilePath test_data_dir; 76 base::FilePath test_data_dir;
75 if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) { 77 if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) {
76 ADD_FAILURE(); 78 ADD_FAILURE();
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // interfere with the tests. Those tests that need an external provider 221 // interfere with the tests. Those tests that need an external provider
220 // will register one specifically. 222 // will register one specifically.
221 service_->ClearProvidersForTesting(); 223 service_->ClearProvidersForTesting();
222 224
223 #if defined(OS_CHROMEOS) 225 #if defined(OS_CHROMEOS)
224 InstallLimiter::Get(profile_.get())->DisableForTest(); 226 InstallLimiter::Get(profile_.get())->DisableForTest();
225 #endif 227 #endif
226 } 228 }
227 229
228 } // namespace extensions 230 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_test_base.h ('k') | chrome/browser/extensions/external_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698