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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc

Issue 9701056: Revert 126809 - bluetooth: remove command-line flag, enabling by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
Index: chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc
===================================================================
--- chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc (revision 126830)
+++ chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc (working copy)
@@ -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() {
+ if (!CommandLine::ForCurrentProcess()
+ ->HasSwitch(switches::kEnableBluetooth)) {
+ return;
+ }
+
adapter_->RemoveObserver(this);
}
@@ -184,6 +190,12 @@
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
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698