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

Unified Diff: chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc

Issue 420663003: Extensions: Move bluetooth APIs to extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android, gn Created 6 years, 4 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/common/extensions/api/bluetooth/bluetooth_manifest_data.cc
diff --git a/chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc b/chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc
deleted file mode 100644
index e7b92132fdf4ae3d353b8e84a7f47485c2613de8..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.h"
-
-#include "chrome/common/extensions/api/bluetooth/bluetooth_manifest_permission.h"
-#include "extensions/common/manifest_constants.h"
-
-namespace extensions {
-
-BluetoothManifestData::BluetoothManifestData(
- scoped_ptr<BluetoothManifestPermission> permission)
- : permission_(permission.Pass()) {
- DCHECK(permission_);
-}
-
-BluetoothManifestData::~BluetoothManifestData() {}
-
-// static
-BluetoothManifestData* BluetoothManifestData::Get(const Extension* extension) {
- return static_cast<BluetoothManifestData*>(
- extension->GetManifestData(manifest_keys::kBluetooth));
-}
-
-// static
-bool BluetoothManifestData::CheckRequest(
- const Extension* extension,
- const BluetoothPermissionRequest& request) {
- const BluetoothManifestData* data = BluetoothManifestData::Get(extension);
- return data && data->permission()->CheckRequest(extension, request);
-}
-
-// static
-bool BluetoothManifestData::CheckSocketPermitted(
- const Extension* extension) {
- const BluetoothManifestData* data = BluetoothManifestData::Get(extension);
- return data && data->permission()->CheckSocketPermitted(extension);
-}
-
-// static
-bool BluetoothManifestData::CheckLowEnergyPermitted(
- const Extension* extension) {
- const BluetoothManifestData* data = BluetoothManifestData::Get(extension);
- return data && data->permission()->CheckLowEnergyPermitted(extension);
-}
-
-// static
-scoped_ptr<BluetoothManifestData> BluetoothManifestData::FromValue(
- const base::Value& value,
- base::string16* error) {
- scoped_ptr<BluetoothManifestPermission> permission =
- BluetoothManifestPermission::FromValue(value, error);
- if (!permission)
- return scoped_ptr<BluetoothManifestData>();
-
- return scoped_ptr<BluetoothManifestData>(
- new BluetoothManifestData(permission.Pass())).Pass();
-}
-
-BluetoothPermissionRequest::BluetoothPermissionRequest(
- const std::string& uuid)
- : uuid(uuid) {}
-
-BluetoothPermissionRequest::~BluetoothPermissionRequest() {}
-
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698