summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authoravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-16 21:31:00 +0000
committeravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-16 21:31:00 +0000
commitba8164244f0e273737f620a3364177990bbf8658 (patch)
tree3e426424d14b3b8b4dc3408b37c17f6221459d52 /chrome/browser/dom_ui
parent293fd7a9eb27dac7599a752e847c5b15f449519f (diff)
downloadchromium_src-ba8164244f0e273737f620a3364177990bbf8658.zip
chromium_src-ba8164244f0e273737f620a3364177990bbf8658.tar.gz
chromium_src-ba8164244f0e273737f620a3364177990bbf8658.tar.bz2
Removed Labs section from Chrome OS settings page.
BUG=chromium-os:9035 TEST=Go to chrome://settings and observe that there's no Labs section. Review URL: http://codereview.chromium.org/5025001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66324 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/filebrowse_ui.cc28
-rw-r--r--chrome/browser/dom_ui/mediaplayer_browsertest.cc14
-rw-r--r--chrome/browser/dom_ui/mediaplayer_ui.cc9
-rw-r--r--chrome/browser/dom_ui/options/options_ui.cc2
4 files changed, 18 insertions, 35 deletions
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc
index 6abb3f0..855ba8e 100644
--- a/chrome/browser/dom_ui/filebrowse_ui.cc
+++ b/chrome/browser/dom_ui/filebrowse_ui.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/callback.h"
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -31,15 +32,14 @@
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/metrics/user_metrics.h"
-#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/net/url_fetcher.h"
-#include "chrome/common/pref_names.h"
#include "chrome/common/time_format.h"
#include "chrome/common/url_constants.h"
#include "grit/browser_resources.h"
@@ -640,16 +640,10 @@ void FilebrowseHandler::EnqueueMediaFile(const ListValue* args) {
void FilebrowseHandler::HandleIsAdvancedEnabled(const ListValue* args) {
#if defined(OS_CHROMEOS)
- Browser* browser = BrowserList::GetLastActive();
- bool is_enabled = false;
- bool mp_enabled = false;
- if (browser) {
- Profile* profile = browser->profile();
- PrefService* pref_service = profile->GetPrefs();
- is_enabled = pref_service->GetBoolean(
- prefs::kLabsAdvancedFilesystemEnabled);
- mp_enabled = pref_service->GetBoolean(prefs::kLabsMediaplayerEnabled);
- }
+ bool is_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAdvancedFileSystem);
+ bool mp_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableMediaPlayer);
DictionaryValue info_value;
info_value.SetBoolean("enabled", is_enabled);
info_value.SetBoolean("mpEnabled", mp_enabled);
@@ -1163,14 +1157,8 @@ Browser* FileBrowseUI::GetPopupForPath(const std::string& path,
Profile* profile) {
std::string current_path = path;
if (current_path.empty()) {
- Browser* browser = BrowserList::GetLastActive();
- if (browser == NULL) {
- return NULL;
- }
- Profile* profile = browser->profile();
- PrefService* pref_service = profile->GetPrefs();
- bool is_enabled = pref_service->GetBoolean(
- prefs::kLabsAdvancedFilesystemEnabled);
+ bool is_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAdvancedFileSystem);
if (!is_enabled) {
FilePath default_download_path;
if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
diff --git a/chrome/browser/dom_ui/mediaplayer_browsertest.cc b/chrome/browser/dom_ui/mediaplayer_browsertest.cc
index 1dcbfae..c90784a 100644
--- a/chrome/browser/dom_ui/mediaplayer_browsertest.cc
+++ b/chrome/browser/dom_ui/mediaplayer_browsertest.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
#include "base/ref_counted.h"
#include "base/utf_string_conversions.h"
#include "chrome/test/automation/dom_element_proxy.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/dom_ui/mediaplayer_ui.h"
-#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/common/pref_names.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
@@ -22,6 +22,10 @@ class MediaPlayerBrowserTest : public InProcessBrowserTest {
public:
MediaPlayerBrowserTest() {}
+ virtual void SetUpCommandLine(CommandLine* command_line) {
+ command_line->AppendSwitch(switches::kEnableMediaPlayer);
+ }
+
GURL GetMusicTestURL() {
return GURL("http://localhost:1337/files/plugin/sample_mp3.mp3");
}
@@ -66,9 +70,6 @@ IN_PROC_BROWSER_TEST_F(MediaPlayerBrowserTest, Popup) {
ui_test_utils::NavigateToURL(browser(),
GURL("chrome://downloads"));
- PrefService* pref_service = browser()->profile()->GetPrefs();
- pref_service->SetBoolean(prefs::kLabsMediaplayerEnabled, true);
-
MediaPlayer* player = MediaPlayer::Get();
// Check that its not currently visible
ASSERT_FALSE(IsPlayerVisible());
@@ -85,9 +86,6 @@ IN_PROC_BROWSER_TEST_F(MediaPlayerBrowserTest, PopupPlaylist) {
GURL("chrome://downloads"));
- PrefService* pref_service = browser()->profile()->GetPrefs();
- pref_service->SetBoolean(prefs::kLabsMediaplayerEnabled, true);
-
MediaPlayer* player = MediaPlayer::Get();
player->EnqueueMediaURL(GetMusicTestURL(), NULL);
diff --git a/chrome/browser/dom_ui/mediaplayer_ui.cc b/chrome/browser/dom_ui/mediaplayer_ui.cc
index ca9b78b..74259c2 100644
--- a/chrome/browser/dom_ui/mediaplayer_ui.cc
+++ b/chrome/browser/dom_ui/mediaplayer_ui.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/dom_ui/mediaplayer_ui.h"
#include "app/resource_bundle.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/path_service.h"
@@ -25,14 +26,13 @@
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/history/history_types.h"
-#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/net/url_fetcher.h"
-#include "chrome/common/pref_names.h"
#include "chrome/common/time_format.h"
#include "chrome/common/url_constants.h"
#include "grit/browser_resources.h"
@@ -381,9 +381,8 @@ void MediaPlayer::ForcePlayMediaURL(const GURL& url, Browser* creator) {
bool MediaPlayer::Enabled() {
#if defined(OS_CHROMEOS)
- Profile* profile = BrowserList::GetLastActive()->profile();
- PrefService* pref_service = profile->GetPrefs();
- return pref_service->GetBoolean(prefs::kLabsMediaplayerEnabled);
+ return CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableMediaPlayer);
#else
return true;
#endif
diff --git a/chrome/browser/dom_ui/options/options_ui.cc b/chrome/browser/dom_ui/options/options_ui.cc
index 009c0e1..44d3b5d 100644
--- a/chrome/browser/dom_ui/options/options_ui.cc
+++ b/chrome/browser/dom_ui/options/options_ui.cc
@@ -58,7 +58,6 @@
#include "chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.h"
#include "chrome/browser/chromeos/dom_ui/cros_personal_options_handler.h"
#include "chrome/browser/chromeos/dom_ui/internet_options_handler.h"
-#include "chrome/browser/chromeos/dom_ui/labs_handler.h"
#include "chrome/browser/chromeos/dom_ui/language_chewing_options_handler.h"
#include "chrome/browser/chromeos/dom_ui/language_customize_modifier_keys_handler.h"
#include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h"
@@ -162,7 +161,6 @@ OptionsUI::OptionsUI(TabContents* contents) : DOMUI(contents) {
AddOptionsPageUIHandler(localized_strings,
new chromeos::AccountsOptionsHandler());
AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler());
- AddOptionsPageUIHandler(localized_strings, new LabsHandler());
AddOptionsPageUIHandler(localized_strings,
new chromeos::LanguageChewingOptionsHandler());
AddOptionsPageUIHandler(localized_strings,