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

Side by Side Diff: chrome/browser/profiles/profile_impl.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/browser/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 if (!extensions_enabled) 499 if (!extensions_enabled)
500 autoupdate_enabled = false; 500 autoupdate_enabled = false;
501 else 501 else
502 autoupdate_enabled = !command_line->HasSwitch(switches::kGuestSession); 502 autoupdate_enabled = !command_line->HasSwitch(switches::kGuestSession);
503 #endif 503 #endif
504 extension_service_.reset(new ExtensionService( 504 extension_service_.reset(new ExtensionService(
505 this, 505 this,
506 CommandLine::ForCurrentProcess(), 506 CommandLine::ForCurrentProcess(),
507 GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), 507 GetPath().AppendASCII(ExtensionService::kInstallDirectoryName),
508 extension_prefs_.get(), 508 extension_prefs_.get(),
509 extension_settings_.get(),
510 autoupdate_enabled, 509 autoupdate_enabled,
511 extensions_enabled)); 510 extensions_enabled));
512 511
513 RegisterComponentExtensions(); 512 RegisterComponentExtensions();
514 513
515 #if defined(GOOGLE_CHROME_BUILD) 514 #if defined(GOOGLE_CHROME_BUILD)
516 // If first run and brand code not equal to ECDB, install default apps. 515 // If first run and brand code not equal to ECDB, install default apps.
517 #if defined(OS_WIN) 516 #if defined(OS_WIN)
518 string16 brand; 517 string16 brand;
519 GoogleUpdateSettings::GetBrand(&brand); 518 GoogleUpdateSettings::GetBrand(&brand);
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 // Make sure we save to disk that the session has opened. 991 // Make sure we save to disk that the session has opened.
993 prefs_->ScheduleSavePersistentPrefs(); 992 prefs_->ScheduleSavePersistentPrefs();
994 993
995 // Ensure that preferences set by extensions are restored in the profile 994 // Ensure that preferences set by extensions are restored in the profile
996 // as early as possible. The constructor takes care of that. 995 // as early as possible. The constructor takes care of that.
997 extension_prefs_.reset(new ExtensionPrefs( 996 extension_prefs_.reset(new ExtensionPrefs(
998 prefs_.get(), 997 prefs_.get(),
999 GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), 998 GetPath().AppendASCII(ExtensionService::kInstallDirectoryName),
1000 GetExtensionPrefValueMap())); 999 GetExtensionPrefValueMap()));
1001 1000
1002 extension_settings_ = new ExtensionSettings(
1003 GetPath().AppendASCII(ExtensionService::kSettingsDirectoryName));
1004
1005 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); 1001 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false);
1006 1002
1007 DCHECK(!net_pref_observer_.get()); 1003 DCHECK(!net_pref_observer_.get());
1008 net_pref_observer_.reset( 1004 net_pref_observer_.reset(
1009 new NetPrefObserver(prefs_.get(), GetPrerenderManager(), predictor_)); 1005 new NetPrefObserver(prefs_.get(), GetPrerenderManager(), predictor_));
1010 1006
1011 DoFinalInit(); 1007 DoFinalInit();
1012 } 1008 }
1013 1009
1014 PrefService* ProfileImpl::GetPrefs() { 1010 PrefService* ProfileImpl::GetPrefs() {
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1831 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { 1827 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() {
1832 if (!spellcheck_profile_.get()) 1828 if (!spellcheck_profile_.get())
1833 spellcheck_profile_.reset(new SpellCheckProfile()); 1829 spellcheck_profile_.reset(new SpellCheckProfile());
1834 return spellcheck_profile_.get(); 1830 return spellcheck_profile_.get();
1835 } 1831 }
1836 1832
1837 void ProfileImpl::SetDownloadManagerDelegate( 1833 void ProfileImpl::SetDownloadManagerDelegate(
1838 ChromeDownloadManagerDelegate* delegate) { 1834 ChromeDownloadManagerDelegate* delegate) {
1839 download_manager_delegate_ = delegate; 1835 download_manager_delegate_ = delegate;
1840 } 1836 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698