summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorscottmg@google.com <scottmg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 02:48:07 +0000
committerscottmg@google.com <scottmg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 02:48:07 +0000
commite11d7e195bafe65e12685aecc80932a26f994685 (patch)
tree3823f42777e49f5bcd5ad563281a2497891f8b57 /chrome
parent92caac399cdd54a1709bfcf56c62be9dba534d4f (diff)
downloadchromium_src-e11d7e195bafe65e12685aecc80932a26f994685.zip
chromium_src-e11d7e195bafe65e12685aecc80932a26f994685.tar.gz
chromium_src-e11d7e195bafe65e12685aecc80932a26f994685.tar.bz2
Revert 126809 - bluetooth: remove command-line flag, enabling by default
Bluetooth is to be enabled by default for R19, the UI already includes a separate "Enable bluetooth" checkbox that is connected to the radio power, so there is no need to leave the flag in place. BUG=chromium-os:23022,chromium:106446 TEST=verified bluetooth now enabled by default Change-Id: I0814b903d4764774cb63fb0b2c003ee0d5c9a49e Review URL: http://codereview.chromium.org/9702028 TBR=keybuk@chromium.org Review URL: https://chromiumcodereview.appspot.com/9701056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/about_flags.cc9
-rw-r--r--chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc13
-rw-r--r--chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc12
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
6 files changed, 44 insertions, 0 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 162246c..141b0ee 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -4810,6 +4810,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_DISABLE_SHORTCUTS_PROVIDER_DESCRIPTION" desc=" Description of the 'Disable better ranking of previously selected shortcuts in omnibox' lab.">
Remembers commonly selected autocomplete results based on the omnibox search term and offers those URLs the next time that same search term is typed.
</message>
+ <message name="IDS_FLAGS_ENABLE_BLUETOOTH_NAME" desc="Name of the 'Bluetooth' lab.">
+ Bluetooth
+ </message>
+ <message name="IDS_FLAGS_ENABLE_BLUETOOTH_DESCRIPTION" desc="Description of the 'Bluetooth' lab.">
+ Enable Chrome OS Bluetooth support.
+ </message>
<message name="IDS_FLAGS_MEMORY_WIDGET_NAME" desc="Name of the 'Show memory status' lab.">
Show memory status
</message>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 5258f24..5a67cf8 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -382,6 +382,15 @@ const Experiment kExperiments[] = {
kOsAll,
SINGLE_VALUE_TYPE(switches::kDisableShortcutsProvider)
},
+#if defined(OS_CHROMEOS)
+ {
+ "enable-bluetooth",
+ IDS_FLAGS_ENABLE_BLUETOOTH_NAME,
+ IDS_FLAGS_ENABLE_BLUETOOTH_DESCRIPTION,
+ kOsCrOS,
+ SINGLE_VALUE_TYPE(switches::kEnableBluetooth)
+ },
+#endif
{
"memory-widget",
IDS_FLAGS_MEMORY_WIDGET_NAME,
diff --git a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
index a98c879..7983715 100644
--- a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
#include "chrome/browser/chromeos/system/runtime_environment.h"
#include "chrome/browser/ui/webui/options/chromeos/system_settings_provider.h"
+#include "chrome/common/chrome_switches.h"
#include "content/public/browser/web_ui.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -34,6 +35,11 @@ BluetoothOptionsHandler::BluetoothOptionsHandler() {
}
BluetoothOptionsHandler::~BluetoothOptionsHandler() {
+ if (!CommandLine::ForCurrentProcess()
+ ->HasSwitch(switches::kEnableBluetooth)) {
+ return;
+ }
+
adapter_->RemoveObserver(this);
}
@@ -112,6 +118,13 @@ void BluetoothOptionsHandler::GetLocalizedValues(
}
void BluetoothOptionsHandler::Initialize() {
+ // Bluetooth support is a work in progress. Supress the feature unless
+ // explicitly enabled via a command line flag.
+ if (!CommandLine::ForCurrentProcess()
+ ->HasSwitch(switches::kEnableBluetooth)) {
+ return;
+ }
+
adapter_.reset(BluetoothAdapter::CreateDefaultAdapter());
adapter_->AddObserver(this);
diff --git a/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc b/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc
index e61c248..5ae0a95 100644
--- a/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
#include "chrome/browser/chromeos/system/runtime_environment.h"
#include "chrome/browser/ui/webui/options2/chromeos/system_settings_provider2.h"
+#include "chrome/common/chrome_switches.h"
#include "content/public/browser/web_ui.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -53,6 +54,11 @@ BluetoothOptionsHandler::BluetoothOptionsHandler() : weak_ptr_factory_(this) {
}
BluetoothOptionsHandler::~BluetoothOptionsHandler() {
+ if (!CommandLine::ForCurrentProcess()
+ ->HasSwitch(switches::kEnableBluetooth)) {
+ return;
+ }
+
adapter_->RemoveObserver(this);
}
@@ -184,6 +190,12 @@ void BluetoothOptionsHandler::RegisterMessages() {
void BluetoothOptionsHandler::InitializeBluetoothStatusCallback(
const ListValue* args) {
+ // Bluetooth support is a work in progress. Supress the feature unless
+ // explicitly enabled via a command line flag.
+ if (!CommandLine::ForCurrentProcess()
+ ->HasSwitch(switches::kEnableBluetooth)) {
+ return;
+ }
adapter_.reset(BluetoothAdapter::CreateDefaultAdapter());
adapter_->AddObserver(this);
// Show or hide the bluetooth settings and update the checkbox based
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 7e3ac3d..6191376 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1189,6 +1189,9 @@ const char kEnableGData[] = "enable-gdata";
// Skips OAuth part of ChromeOS login process.
const char kSkipOAuthLogin[] = "skip-oauth-login";
+// Enables bluetooth support on ChromeOS.
+const char kEnableBluetooth[] = "enable-bluetooth";
+
// Enables device policy support on ChromeOS.
const char kEnableDevicePolicy[] = "enable-device-policy";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index a2efdc0..4b43caa 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -325,6 +325,7 @@ extern const char kWinHttpProxyResolver[];
#if defined(OS_CHROMEOS)
extern const char kEnableGData[];
extern const char kSkipOAuthLogin[];
+extern const char kEnableBluetooth[];
extern const char kEnableDevicePolicy[];
extern const char kEnableGView[];
extern const char kEnableKioskMode[];