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

Unified Diff: chrome/browser/ui/bluetooth/bluetooth_chooser_context_factory.cc

Issue 1560263002: Store Bluetooth permissions in website settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address reillyg@'s comments Created 4 years, 11 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/bluetooth/bluetooth_chooser_context_factory.cc
diff --git a/chrome/browser/usb/usb_chooser_context_factory.cc b/chrome/browser/ui/bluetooth/bluetooth_chooser_context_factory.cc
similarity index 50%
copy from chrome/browser/usb/usb_chooser_context_factory.cc
copy to chrome/browser/ui/bluetooth/bluetooth_chooser_context_factory.cc
index 7a26f0f68bf24263df3974aaa0c7381f71649ebe..7c2e07567fcdefb9c76dedfe56f85c38999c6c94 100644
--- a/chrome/browser/usb/usb_chooser_context_factory.cc
+++ b/chrome/browser/ui/bluetooth/bluetooth_chooser_context_factory.cc
@@ -2,40 +2,41 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/usb/usb_chooser_context_factory.h"
+#include "chrome/browser/ui/bluetooth/bluetooth_chooser_context_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/usb/usb_chooser_context.h"
+#include "chrome/browser/ui/bluetooth/bluetooth_chooser_context.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
-UsbChooserContextFactory::UsbChooserContextFactory()
+BluetoothChooserContextFactory::BluetoothChooserContextFactory()
: BrowserContextKeyedServiceFactory(
- "UsbChooserContext",
+ "BluetoothChooserContext",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(HostContentSettingsMapFactory::GetInstance());
}
-UsbChooserContextFactory::~UsbChooserContextFactory() {}
+BluetoothChooserContextFactory::~BluetoothChooserContextFactory() {}
-KeyedService* UsbChooserContextFactory::BuildServiceInstanceFor(
+KeyedService* BluetoothChooserContextFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- return new UsbChooserContext(Profile::FromBrowserContext(context));
+ return new BluetoothChooserContext(Profile::FromBrowserContext(context));
}
// static
-UsbChooserContextFactory* UsbChooserContextFactory::GetInstance() {
- return base::Singleton<UsbChooserContextFactory>::get();
+BluetoothChooserContextFactory* BluetoothChooserContextFactory::GetInstance() {
+ return base::Singleton<BluetoothChooserContextFactory>::get();
}
// static
-UsbChooserContext* UsbChooserContextFactory::GetForProfile(Profile* profile) {
- return static_cast<UsbChooserContext*>(
+BluetoothChooserContext* BluetoothChooserContextFactory::GetForProfile(
+ Profile* profile) {
+ return static_cast<BluetoothChooserContext*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
-content::BrowserContext* UsbChooserContextFactory::GetBrowserContextToUse(
+content::BrowserContext* BluetoothChooserContextFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
return chrome::GetBrowserContextOwnInstanceInIncognito(context);
}

Powered by Google App Engine
This is Rietveld 408576698