diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 20:20:50 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 20:20:50 +0000 |
commit | 6c9f7496a60ab705b2418632a44731cd54ef0f26 (patch) | |
tree | b748d52b222c89e42305f25b96bddb7f6b413ddd | |
parent | 3866ededd593beba8c96cdb92746ee55bd6a8b37 (diff) | |
download | chromium_src-6c9f7496a60ab705b2418632a44731cd54ef0f26.zip chromium_src-6c9f7496a60ab705b2418632a44731cd54ef0f26.tar.gz chromium_src-6c9f7496a60ab705b2418632a44731cd54ef0f26.tar.bz2 |
Reset chrome://newtab URLs when the user selects to configure it.
BUG=50927
TEST=Manually configure a profile with prefs::kHomepage = chrome://newtab and prefs::kHomePageIsNewTabPage = true, fire up chrome and try to configure a different homepage URL through the options dialog.
Review URL: http://codereview.chromium.org/3092003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54807 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/preferences_window_controller.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm index 64f99ed..03e2978 100644 --- a/chrome/browser/cocoa/preferences_window_controller.mm +++ b/chrome/browser/cocoa/preferences_window_controller.mm @@ -1060,10 +1060,13 @@ enum { kHomepageNewTabPage, kHomepageURL }; // appropriate user metric. - (void)setNewTabPageIsHomePageIndex:(NSInteger)index { bool useNewTabPage = index == kHomepageNewTabPage ? true : false; - if (useNewTabPage) + if (useNewTabPage) { [self recordUserAction:UserMetricsAction("Options_Homepage_UseNewTab")]; - else + } else { [self recordUserAction:UserMetricsAction("Options_Homepage_UseURL")]; + if ([self isHomepageNewTabUIURL]) + homepage_.SetValueIfNotManaged(std::string()); + } newTabPageIsHomePage_.SetValueIfNotManaged(useNewTabPage); } |