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

Unified Diff: chrome/common/extensions/api/sockets/sockets_manifest_permission.cc

Issue 145663004: Replace "bluetooth" permission with manifest property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused function. Created 6 years, 10 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/sockets/sockets_manifest_permission.cc
diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc b/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc
index 61dc7197be5bd41c5c673ffa35e4cf1d352869d9..269ed94de17ba43b84f5a65960f57e51a9913023 100644
--- a/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc
+++ b/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc
@@ -5,6 +5,7 @@
#include "chrome/common/extensions/api/sockets/sockets_manifest_permission.h"
#include "base/memory/scoped_ptr.h"
+#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/extensions/api/manifest_types.h"
@@ -232,11 +233,8 @@ ManifestPermission* SocketsManifestPermission::Diff(
static_cast<const SocketsManifestPermission*>(rhs);
scoped_ptr<SocketsManifestPermission> result(new SocketsManifestPermission());
- std::set_difference(
- permissions_.begin(), permissions_.end(),
- other->permissions_.begin(), other->permissions_.end(),
- std::inserter<SocketPermissionEntrySet>(
- result->permissions_, result->permissions_.begin()));
+ result->permissions_ = base::STLSetDifference<SocketPermissionEntrySet>(
+ permissions_, other->permissions_);
return result.release();
}
@@ -246,11 +244,8 @@ ManifestPermission* SocketsManifestPermission::Union(
static_cast<const SocketsManifestPermission*>(rhs);
scoped_ptr<SocketsManifestPermission> result(new SocketsManifestPermission());
- std::set_union(
- permissions_.begin(), permissions_.end(),
- other->permissions_.begin(), other->permissions_.end(),
- std::inserter<SocketPermissionEntrySet>(
- result->permissions_, result->permissions_.begin()));
+ result->permissions_ = base::STLSetUnion<SocketPermissionEntrySet>(
+ permissions_, other->permissions_);
return result.release();
}
@@ -260,11 +255,8 @@ ManifestPermission* SocketsManifestPermission::Intersect(
static_cast<const SocketsManifestPermission*>(rhs);
scoped_ptr<SocketsManifestPermission> result(new SocketsManifestPermission());
- std::set_intersection(
- permissions_.begin(), permissions_.end(),
- other->permissions_.begin(), other->permissions_.end(),
- std::inserter<SocketPermissionEntrySet>(
- result->permissions_, result->permissions_.begin()));
+ result->permissions_ = base::STLSetIntersection<SocketPermissionEntrySet>(
+ permissions_, other->permissions_);
return result.release();
}
@@ -272,9 +264,8 @@ bool SocketsManifestPermission::Contains(const ManifestPermission* rhs) const {
const SocketsManifestPermission* other =
static_cast<const SocketsManifestPermission*>(rhs);
- return std::includes(
- permissions_.begin(), permissions_.end(),
- other->permissions_.begin(), other->permissions_.end());
+ return base::STLIncludes<SocketPermissionEntrySet>(permissions_,
+ other->permissions_);
}
bool SocketsManifestPermission::Equal(const ManifestPermission* rhs) const {
« no previous file with comments | « chrome/common/extensions/api/manifest_types.json ('k') | chrome/common/extensions/chrome_manifest_handlers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698