summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 12:01:19 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 12:01:19 +0000
commita405e719937d116393de80046ed520a06364bc2a (patch)
tree5d639c0389ba59a43af31cee00d5a3b90ae1a1c4 /chrome/browser/views/options
parent5f2faeab17c40d1ee10ad1e94140369213992968 (diff)
downloadchromium_src-a405e719937d116393de80046ed520a06364bc2a.zip
chromium_src-a405e719937d116393de80046ed520a06364bc2a.tar.gz
chromium_src-a405e719937d116393de80046ed520a06364bc2a.tar.bz2
Command line flag to disable the cookie prompt.
The XIB change re-introduces the cookie tab view item with the "ask" setting as additinoal tab view item. The controller deletes the one not required according to the command line flag. BUG=50083 TEST=none Review URL: http://codereview.chromium.org/3075013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54308 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/options')
-rw-r--r--chrome/browser/views/options/content_filter_page_view.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/chrome/browser/views/options/content_filter_page_view.cc b/chrome/browser/views/options/content_filter_page_view.cc
index 299d6b3..0f3261e 100644
--- a/chrome/browser/views/options/content_filter_page_view.cc
+++ b/chrome/browser/views/options/content_filter_page_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/options/content_filter_page_view.h"
#include "app/l10n_util.h"
+#include "base/command_line.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
@@ -12,6 +13,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/views/options/exceptions_view.h"
#include "chrome/browser/views/options/simple_content_exceptions_view.h"
+#include "chrome/common/chrome_switches.h"
#include "grit/generated_resources.h"
#include "views/controls/button/radio_button.h"
#include "views/grid_layout.h"
@@ -88,7 +90,7 @@ void ContentFilterPageView::InitControlLayout() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
static const int kAskIDs[] = {
- 0,
+ IDS_COOKIES_ASK_EVERY_TIME_RADIO,
0,
0,
0,
@@ -100,14 +102,18 @@ void ContentFilterPageView::InitControlLayout() {
Need_a_setting_for_every_content_settings_type);
DCHECK_EQ(arraysize(kAskIDs),
static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES));
- if (kAskIDs[content_type_] != 0) {
- ask_radio_ = new views::RadioButton(
- l10n_util::GetString(kAskIDs[content_type_]), radio_button_group);
- ask_radio_->set_listener(this);
- ask_radio_->SetMultiLine(true);
- layout->StartRow(0, single_column_set_id);
- layout->AddView(ask_radio_);
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
+ if (content_type_ != CONTENT_SETTINGS_TYPE_COOKIES ||
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableCookiePrompt)) {
+ if (kAskIDs[content_type_] != 0) {
+ ask_radio_ = new views::RadioButton(
+ l10n_util::GetString(kAskIDs[content_type_]), radio_button_group);
+ ask_radio_->set_listener(this);
+ ask_radio_->SetMultiLine(true);
+ layout->StartRow(0, single_column_set_id);
+ layout->AddView(ask_radio_);
+ layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
+ }
}
static const int kBlockIDs[] = {