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

Unified Diff: chrome/test/base/testing_profile_manager.cc

Issue 16658015: Add device policies to control accessibility settings on the login screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed leaky tests. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/testing_profile_manager.h ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile_manager.cc
diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc
index 9871d4a4add2b9f8f07d09986b84e14138664277..5a5f6202af3cda43e60c9cac9afa4d175d89cd92 100644
--- a/chrome/test/base/testing_profile_manager.cc
+++ b/chrome/test/base/testing_profile_manager.cc
@@ -5,8 +5,10 @@
#include "chrome/test/base/testing_profile_manager.h"
#include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ref_counted.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/extensions/extension_special_storage_policy.h"
+#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/test/base/testing_browser_process.h"
@@ -45,6 +47,7 @@ bool TestingProfileManager::SetUp() {
TestingProfile* TestingProfileManager::CreateTestingProfile(
const std::string& profile_name,
+ scoped_ptr<PrefServiceSyncable> prefs,
const string16& user_name,
int avatar_id) {
DCHECK(called_set_up_);
@@ -54,7 +57,11 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
profile_path = profile_path.AppendASCII(profile_name);
// Create the profile and register it.
- TestingProfile* profile = new TestingProfile(profile_path);
+ TestingProfile* profile = new TestingProfile(
+ profile_path,
+ NULL,
+ scoped_refptr<ExtensionSpecialStoragePolicy>(),
+ prefs.Pass());
profile_manager_->AddProfile(profile); // Takes ownership.
// Update the user metadata.
@@ -71,7 +78,8 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
TestingProfile* TestingProfileManager::CreateTestingProfile(
const std::string& name) {
DCHECK(called_set_up_);
- return CreateTestingProfile(name, UTF8ToUTF16(name), 0);
+ return CreateTestingProfile(name, scoped_ptr<PrefServiceSyncable>(),
+ UTF8ToUTF16(name), 0);
}
void TestingProfileManager::DeleteTestingProfile(const std::string& name) {
« no previous file with comments | « chrome/test/base/testing_profile_manager.h ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698