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

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: Sync to tip. Latest comments. 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 extension_pref_value_map_.reset(new ExtensionPrefValueMap); 341 extension_pref_value_map_.reset(new ExtensionPrefValueMap);
342 // Note that the GetPrefs() creates a TestingPrefService, therefore 342 // Note that the GetPrefs() creates a TestingPrefService, therefore
343 // the extension controlled pref values set in extension_prefs_ 343 // the extension controlled pref values set in extension_prefs_
344 // are not reflected in the pref service. One would need to 344 // are not reflected in the pref service. One would need to
345 // inject a new ExtensionPrefStore(extension_pref_value_map_.get(), false). 345 // inject a new ExtensionPrefStore(extension_pref_value_map_.get(), false).
346 extension_prefs_.reset( 346 extension_prefs_.reset(
347 new ExtensionPrefs(GetPrefs(), 347 new ExtensionPrefs(GetPrefs(),
348 install_directory, 348 install_directory,
349 extension_pref_value_map_.get())); 349 extension_pref_value_map_.get()));
350 extension_settings_ =
351 new ExtensionSettings(GetPath().AppendASCII("Extension Settings"));
352 extension_service_.reset(new ExtensionService(this, 350 extension_service_.reset(new ExtensionService(this,
353 command_line, 351 command_line,
354 install_directory, 352 install_directory,
355 extension_prefs_.get(), 353 extension_prefs_.get(),
356 extension_settings_.get(),
357 autoupdate_enabled, 354 autoupdate_enabled,
358 true)); 355 true));
359 return extension_service_.get(); 356 return extension_service_.get();
360 } 357 }
361 358
362 FilePath TestingProfile::GetPath() { 359 FilePath TestingProfile::GetPath() {
363 return profile_path_; 360 return profile_path_;
364 } 361 }
365 362
366 TestingPrefService* TestingProfile::GetTestingPrefService() { 363 TestingPrefService* TestingProfile::GetTestingPrefService() {
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 797 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
801 return GetExtensionSpecialStoragePolicy(); 798 return GetExtensionSpecialStoragePolicy();
802 } 799 }
803 800
804 void TestingProfile::DestroyWebDataService() { 801 void TestingProfile::DestroyWebDataService() {
805 if (!web_data_service_.get()) 802 if (!web_data_service_.get())
806 return; 803 return;
807 804
808 web_data_service_->Shutdown(); 805 web_data_service_->Shutdown();
809 } 806 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698