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

Unified Diff: extensions/browser/error_map.cc

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
« no previous file with comments | « extensions/browser/error_map.h ('k') | extensions/browser/error_map_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/error_map.cc
diff --git a/extensions/browser/error_map.cc b/extensions/browser/error_map.cc
index 5f94e34284ab6704fd2e4c6542e6438a620efa56..9a806002859da02c8aa41e2c9a3bc0d3cff8ed6b 100644
--- a/extensions/browser/error_map.cc
+++ b/extensions/browser/error_map.cc
@@ -98,7 +98,7 @@ class ErrorMap::ExtensionEntry {
void DeleteAllErrors();
// Add the error to the list, and return a weak reference.
- const ExtensionError* AddError(scoped_ptr<ExtensionError> error);
+ const ExtensionError* AddError(std::unique_ptr<ExtensionError> error);
const ErrorList* list() const { return &list_; }
@@ -138,7 +138,7 @@ void ErrorMap::ExtensionEntry::DeleteAllErrors() {
}
const ExtensionError* ErrorMap::ExtensionEntry::AddError(
- scoped_ptr<ExtensionError> error) {
+ std::unique_ptr<ExtensionError> error) {
for (ErrorList::iterator iter = list_.begin(); iter != list_.end(); ++iter) {
// If we find a duplicate error, remove the old error and add the new one,
// incrementing the occurrence count of the error. We use the new error
@@ -182,7 +182,8 @@ const ErrorList& ErrorMap::GetErrorsForExtension(
return iter != map_.end() ? *iter->second->list() : g_empty_error_list.Get();
}
-const ExtensionError* ErrorMap::AddError(scoped_ptr<ExtensionError> error) {
+const ExtensionError* ErrorMap::AddError(
+ std::unique_ptr<ExtensionError> error) {
EntryMap::iterator iter = map_.find(error->extension_id());
if (iter == map_.end()) {
iter = map_.insert(std::pair<std::string, ExtensionEntry*>(
« no previous file with comments | « extensions/browser/error_map.h ('k') | extensions/browser/error_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698