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

Unified Diff: chrome/browser/dom_ui/filebrowse_ui.cc

Issue 5025001: Removed Labs section from Chrome OS settings page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed RegisterPref call Created 10 years, 1 month 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/browser/chromeos/usb_mount_observer.cc ('k') | chrome/browser/dom_ui/mediaplayer_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/filebrowse_ui.cc
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc
index 6abb3f0ac93c2e96e23f3bd760e68b5c461b7ae0..855ba8e3d89801cfb6ce0b32a68ccfc9ce1d3905 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,
« no previous file with comments | « chrome/browser/chromeos/usb_mount_observer.cc ('k') | chrome/browser/dom_ui/mediaplayer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698