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

Unified Diff: extensions/browser/declarative_user_script_manager.cc

Issue 2294653002: Some linked_ptr -> unique_ptr conversion in extensions/browser. (Closed)
Patch Set: nullptr Created 4 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: extensions/browser/declarative_user_script_manager.cc
diff --git a/extensions/browser/declarative_user_script_manager.cc b/extensions/browser/declarative_user_script_manager.cc
index 9c10ab3f2f220ac99806608383a43d3e47ddf11a..d1d90632ca840ce783cdd8697c68ed036b5cec88 100644
--- a/extensions/browser/declarative_user_script_manager.cc
+++ b/extensions/browser/declarative_user_script_manager.cc
@@ -4,6 +4,7 @@
#include "extensions/browser/declarative_user_script_manager.h"
+#include "base/memory/ptr_util.h"
#include "content/public/browser/browser_context.h"
#include "extensions/browser/declarative_user_script_manager_factory.h"
#include "extensions/browser/declarative_user_script_master.h"
@@ -42,10 +43,10 @@ DeclarativeUserScriptManager::GetDeclarativeUserScriptMasterByID(
DeclarativeUserScriptMaster*
DeclarativeUserScriptManager::CreateDeclarativeUserScriptMaster(
const HostID& host_id) {
- linked_ptr<DeclarativeUserScriptMaster> master(
- new DeclarativeUserScriptMaster(browser_context_, host_id));
- declarative_user_script_masters_[host_id] = master;
- return master.get();
+ DeclarativeUserScriptMaster* master =
+ new DeclarativeUserScriptMaster(browser_context_, host_id);
+ declarative_user_script_masters_[host_id] = base::WrapUnique(master);
Devlin 2016/08/30 19:21:54 MakeUnique inlined?
lazyboy 2016/08/30 20:30:56 Need raw ptr on next line. Currently this is done
Devlin 2016/08/30 22:48:28 // Insert a new DeclarativeUserScriptMaster and re
lazyboy 2016/08/30 23:28:29 Done.
+ return master;
}
void DeclarativeUserScriptManager::OnExtensionUnloaded(

Powered by Google App Engine
This is Rietveld 408576698