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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 7775008: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review #6 Created 9 years, 3 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 extension_pref_value_map_.reset(new ExtensionPrefValueMap); 344 extension_pref_value_map_.reset(new ExtensionPrefValueMap);
345 // Note that the GetPrefs() creates a TestingPrefService, therefore 345 // Note that the GetPrefs() creates a TestingPrefService, therefore
346 // the extension controlled pref values set in extension_prefs_ 346 // the extension controlled pref values set in extension_prefs_
347 // are not reflected in the pref service. One would need to 347 // are not reflected in the pref service. One would need to
348 // inject a new ExtensionPrefStore(extension_pref_value_map_.get(), false). 348 // inject a new ExtensionPrefStore(extension_pref_value_map_.get(), false).
349 extension_prefs_.reset( 349 extension_prefs_.reset(
350 new ExtensionPrefs(GetPrefs(), 350 new ExtensionPrefs(GetPrefs(),
351 install_directory, 351 install_directory,
352 extension_pref_value_map_.get())); 352 extension_pref_value_map_.get()));
353 extension_settings_ =
354 new ExtensionSettings(GetPath().AppendASCII("Extension Settings"));
355 extension_service_.reset(new ExtensionService(this, 353 extension_service_.reset(new ExtensionService(this,
356 command_line, 354 command_line,
357 install_directory, 355 install_directory,
358 extension_prefs_.get(), 356 extension_prefs_.get(),
359 extension_settings_.get(),
360 autoupdate_enabled, 357 autoupdate_enabled,
361 true)); 358 true));
362 return extension_service_.get(); 359 return extension_service_.get();
363 } 360 }
364 361
365 FilePath TestingProfile::GetPath() { 362 FilePath TestingProfile::GetPath() {
366 return profile_path_; 363 return profile_path_;
367 } 364 }
368 365
369 TestingPrefService* TestingProfile::GetTestingPrefService() { 366 TestingPrefService* TestingProfile::GetTestingPrefService() {
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 790 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
794 return GetExtensionSpecialStoragePolicy(); 791 return GetExtensionSpecialStoragePolicy();
795 } 792 }
796 793
797 void TestingProfile::DestroyWebDataService() { 794 void TestingProfile::DestroyWebDataService() {
798 if (!web_data_service_.get()) 795 if (!web_data_service_.get())
799 return; 796 return;
800 797
801 web_data_service_->Shutdown(); 798 web_data_service_->Shutdown();
802 } 799 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698