diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 08:21:54 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 08:21:54 +0000 |
commit | 8fe6e1ca6cfc7ba0c64481541ceb336ed148c260 (patch) | |
tree | 242c7394e1c4850d8efc15c3aaa5978fcd3c2e16 /chrome/browser/importer | |
parent | 27528d3c34e78910d53e3281a1e0317a16b4ee98 (diff) | |
download | chromium_src-8fe6e1ca6cfc7ba0c64481541ceb336ed148c260.zip chromium_src-8fe6e1ca6cfc7ba0c64481541ceb336ed148c260.tar.gz chromium_src-8fe6e1ca6cfc7ba0c64481541ceb336ed148c260.tar.bz2 |
Update UI, sync and importer to properly handle managed homepage prefs
The change in Preferences.xib binds the homepage options container's enabled state to the new property PreferencesWindowController.IsHomepageManaged
BUG=43423
TEST=Manual, especially homepage options on general page of options dialog
Review URL: http://codereview.chromium.org/2059001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48371 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/profile_writer.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc index 6689327..ee12572 100644 --- a/chrome/browser/importer/profile_writer.cc +++ b/chrome/browser/importer/profile_writer.cc @@ -44,8 +44,11 @@ void ProfileWriter::AddHomepage(const GURL& home_page) { PrefService* prefs = profile_->GetPrefs(); // NOTE: We set the kHomePage value, but keep the NewTab page as the homepage. - prefs->SetString(prefs::kHomePage, ASCIIToWide(home_page.spec())); - prefs->ScheduleSavePersistentPrefs(); + const PrefService::Preference* pref = prefs->FindPreference(prefs::kHomePage); + if (pref && !pref->IsManaged()) { + prefs->SetString(prefs::kHomePage, ASCIIToWide(home_page.spec())); + prefs->ScheduleSavePersistentPrefs(); + } } void ProfileWriter::AddBookmarkEntry( |