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

Unified Diff: chrome/browser/views/options/advanced_contents_view.cc

Issue 113951: DevTools: remove DevTools from options UI. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/options/advanced_contents_view.cc
===================================================================
--- chrome/browser/views/options/advanced_contents_view.cc (revision 17071)
+++ chrome/browser/views/options/advanced_contents_view.cc (working copy)
@@ -1043,78 +1043,6 @@
void NetworkSection::NotifyPrefChanged(const std::wstring* pref_name) {
}
-////////////////////////////////////////////////////////////////////////////////
-// DevToolsSection
-
-class DevToolsSection : public AdvancedSection,
- public views::ButtonListener {
- public:
- explicit DevToolsSection(Profile* profile);
- virtual ~DevToolsSection() {}
-
- // Overridden from views::ButtonListener:
- virtual void ButtonPressed(views::Button* sender);
-
- protected:
- // OptionsPageView overrides:
- virtual void InitControlLayout();
- virtual void NotifyPrefChanged(const std::wstring* pref_name);
-
- private:
- // Controls for this section:
- views::Checkbox* enable_devtools_checkbox_;
-
- // Preferences for this section:
- BooleanPrefMember enable_devtools_;
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsSection);
-};
-
-DevToolsSection::DevToolsSection(Profile* profile)
- : enable_devtools_checkbox_(NULL),
- AdvancedSection(profile,
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_DEVTOOLS)) {
-}
-
-void DevToolsSection::ButtonPressed(views::Button* sender) {
- if (sender == enable_devtools_checkbox_) {
- bool enabled = enable_devtools_checkbox_->checked();
- UserMetricsRecordAction(enabled ?
- L"Options_DevToolsCheckbox_Enable" :
- L"Options_DevToolsCheckbox_Disable",
- profile()->GetPrefs());
- enable_devtools_.SetValue(enabled);
- }
-}
-
-void DevToolsSection::InitControlLayout() {
- AdvancedSection::InitControlLayout();
-
- enable_devtools_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_ENABLE_DEVTOOLS));
- enable_devtools_checkbox_->set_listener(this);
-
- GridLayout* layout = new GridLayout(contents_);
- contents_->SetLayoutManager(layout);
-
- const int single_column_view_set_id = 0;
- AddWrappingColumnSet(layout, single_column_view_set_id);
-
- AddWrappingCheckboxRow(layout, enable_devtools_checkbox_,
- single_column_view_set_id, false);
-
- // Init member prefs so we can update the controls if prefs change.
- enable_devtools_.Init(prefs::kWebKitDeveloperExtrasEnabled,
- profile()->GetPrefs(), this);
-}
-
-void DevToolsSection::NotifyPrefChanged(const std::wstring* pref_name) {
- if (!pref_name || *pref_name == prefs::kWebKitDeveloperExtrasEnabled) {
- enable_devtools_checkbox_->SetChecked(
- enable_devtools_.GetValue());
- }
-}
-
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -1210,8 +1138,6 @@
layout->AddView(new WebContentSection(profile()));
layout->StartRow(0, single_column_view_set_id);
layout->AddView(new SecuritySection(profile()));
- layout->StartRow(0, single_column_view_set_id);
- layout->AddView(new DevToolsSection(profile()));
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698