summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authormunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 23:20:29 +0000
committermunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 23:20:29 +0000
commitbb95ef9e93adfba1f5ab46de4ae9d523f12ca31c (patch)
tree5916529ffa051b8b17bb007710ea23b0ab1b80fb /chrome/browser
parent80dc5f272b75cddfbb43dc78653cd8ec6a858c54 (diff)
downloadchromium_src-bb95ef9e93adfba1f5ab46de4ae9d523f12ca31c.zip
chromium_src-bb95ef9e93adfba1f5ab46de4ae9d523f12ca31c.tar.gz
chromium_src-bb95ef9e93adfba1f5ab46de4ae9d523f12ca31c.tar.bz2
Add a command-line disable-p13n and use that to disable
p13n related features. Review URL: http://codereview.chromium.org/39029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc4
-rw-r--r--chrome/browser/profile.cc1
-rw-r--r--chrome/browser/views/frame/browser_view.cc2
-rw-r--r--chrome/browser/views/options/options_window_view.cc11
-rw-r--r--chrome/browser/views/toolbar_view.cc6
5 files changed, 16 insertions, 8 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 79ce95a..923f545 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -828,7 +828,9 @@ void NewTabUI::Init() {
AddMessageHandler(new HistoryHandler(this));
AddMessageHandler(new MetricsHandler(this));
#ifdef CHROME_PERSONALIZATION
- AddMessageHandler(Personalization::CreateNewTabPageHandler(this));
+ if (!Personalization::IsP13NDisabled()) {
+ AddMessageHandler(Personalization::CreateNewTabPageHandler(this));
+ }
#endif
NewTabHTMLSource* html_source = new NewTabHTMLSource();
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 3edd32d..9289c2a 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -862,6 +862,7 @@ void ProfileImpl::StopCreateSessionServiceTimer() {
#ifdef CHROME_PERSONALIZATION
ProfilePersonalization* ProfileImpl::GetProfilePersonalization() {
+ DCHECK(!Personalization::IsP13NDisabled());
if (!personalization_.get())
personalization_.reset(
Personalization::CreateProfilePersonalization(this));
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 9f8ae58..207f059 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -463,7 +463,7 @@ void BrowserView::Init() {
#ifdef CHROME_PERSONALIZATION
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- EnablePersonalization(command_line.HasSwitch(switches::kEnableP13n));
+ EnablePersonalization(!command_line.HasSwitch(switches::kDisableP13n));
if (IsPersonalizationEnabled()) {
personalization_ = Personalization::CreateFramePersonalization(
browser_->profile(), this);
diff --git a/chrome/browser/views/options/options_window_view.cc b/chrome/browser/views/options/options_window_view.cc
index 2090c7e..e301d76 100644
--- a/chrome/browser/views/options/options_window_view.cc
+++ b/chrome/browser/views/options/options_window_view.cc
@@ -15,6 +15,7 @@
#include "chrome/common/pref_service.h"
#include "chrome/common/resource_bundle.h"
#ifdef CHROME_PERSONALIZATION
+#include "chrome/personalization/personalization.h"
#include "chrome/personalization/views/user_data_page_view.h"
#endif
#include "chrome/views/dialog_delegate.h"
@@ -200,10 +201,12 @@ void OptionsWindowView::Init() {
content_page, false);
#ifdef CHROME_PERSONALIZATION
- UserDataPageView* user_data_page = new UserDataPageView(profile_);
- tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_USER_DATA_TAB_LABEL),
- user_data_page, false);
+ if (!Personalization::IsP13NDisabled()) {
+ UserDataPageView* user_data_page = new UserDataPageView(profile_);
+ tabs_->AddTabAtIndex(tab_index++,
+ l10n_util::GetString(IDS_OPTIONS_USER_DATA_TAB_LABEL),
+ user_data_page, false);
+ }
#endif
AdvancedPageView* advanced_page = new AdvancedPageView(profile_);
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index c5e16b4..c1b40c4 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -607,8 +607,10 @@ void BrowserToolbarView::RunAppMenu(const CPoint& pt, HWND hwnd) {
l10n_util::GetString(IDS_SHOW_DOWNLOADS));
menu.AppendSeparator();
#ifdef CHROME_PERSONALIZATION
- menu.AppendMenuItemWithLabel(IDC_P13N_INFO,
- Personalization::GetMenuItemInfoText(browser()));
+ if (!Personalization::IsP13NDisabled()) {
+ menu.AppendMenuItemWithLabel(IDC_P13N_INFO,
+ Personalization::GetMenuItemInfoText(browser()));
+ }
#endif
menu.AppendMenuItemWithLabel(IDC_CLEAR_BROWSING_DATA,
l10n_util::GetString(IDS_CLEAR_BROWSING_DATA));