diff options
author | limasdf <limasdf@gmail.com> | 2015-11-13 14:16:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-13 22:17:09 +0000 |
commit | 6ca2e3c43a9b03699b6858b4ed424312a22db107 (patch) | |
tree | 637367b7c4c525e8fc74c9dfd77777b38cf9834b /extensions/common/manifest_handlers | |
parent | c8726de85c7d5e4855fc5db9c7e380273cae4477 (diff) | |
download | chromium_src-6ca2e3c43a9b03699b6858b4ed424312a22db107.zip chromium_src-6ca2e3c43a9b03699b6858b4ed424312a22db107.tar.gz chromium_src-6ca2e3c43a9b03699b6858b4ed424312a22db107.tar.bz2 |
Remove ScopedVector from /extenisons part#1
C++ 11 enables containers that contain move-only type, scoped_ptr.
So, Use std::vector<scoped_ptr<Foo>> instead of ScopedVector.
BUG=554289
TEST=none
Review URL: https://codereview.chromium.org/1445543002
Cr-Commit-Position: refs/heads/master@{#359663}
Diffstat (limited to 'extensions/common/manifest_handlers')
-rw-r--r-- | extensions/common/manifest_handlers/webview_info.cc | 4 | ||||
-rw-r--r-- | extensions/common/manifest_handlers/webview_info.h | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/extensions/common/manifest_handlers/webview_info.cc b/extensions/common/manifest_handlers/webview_info.cc index 9adbcbe..12bafcc 100644 --- a/extensions/common/manifest_handlers/webview_info.cc +++ b/extensions/common/manifest_handlers/webview_info.cc @@ -71,7 +71,7 @@ bool WebviewInfo::IsResourceWebviewAccessible( if (!webview_info) return false; - for (const PartitionItem* item : webview_info->partition_items_) { + for (const auto& item : webview_info->partition_items_) { if (item->Matches(partition_id) && extension->ResourceMatches(item->accessible_resources(), relative_path)) { @@ -83,7 +83,7 @@ bool WebviewInfo::IsResourceWebviewAccessible( } void WebviewInfo::AddPartitionItem(scoped_ptr<PartitionItem> item) { - partition_items_.push_back(item.release()); + partition_items_.push_back(item.Pass()); } WebviewHandler::WebviewHandler() { diff --git a/extensions/common/manifest_handlers/webview_info.h b/extensions/common/manifest_handlers/webview_info.h index ca186a8..887394d 100644 --- a/extensions/common/manifest_handlers/webview_info.h +++ b/extensions/common/manifest_handlers/webview_info.h @@ -6,8 +6,10 @@ #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEBVIEW_INFO_H_ #include <string> +#include <vector> -#include "base/memory/scoped_vector.h" +#include "base/macros.h" +#include "base/memory/scoped_ptr.h" #include "extensions/common/extension.h" #include "extensions/common/manifest_handler.h" @@ -34,7 +36,9 @@ class WebviewInfo : public Extension::ManifestData { private: std::string extension_id_; - ScopedVector<PartitionItem> partition_items_; + std::vector<scoped_ptr<PartitionItem>> partition_items_; + + DISALLOW_COPY_AND_ASSIGN(WebviewInfo); }; // Parses the "webview" manifest key. |