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

Unified Diff: extensions/browser/view_type_utils.cc

Issue 2846743002: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: Created 3 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
Index: extensions/browser/view_type_utils.cc
diff --git a/extensions/browser/view_type_utils.cc b/extensions/browser/view_type_utils.cc
index 933d669037df52c4eeb1fcee9c326456df037f34..bdfb997488602ab4747600c3ad902a0e722858a8 100644
--- a/extensions/browser/view_type_utils.cc
+++ b/extensions/browser/view_type_utils.cc
@@ -5,6 +5,7 @@
#include "extensions/browser/view_type_utils.h"
#include "base/lazy_instance.h"
+#include "base/memory/ptr_util.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extensions_browser_client.h"
@@ -39,7 +40,8 @@ ViewType GetViewType(WebContents* tab) {
}
void SetViewType(WebContents* tab, ViewType type) {
- tab->SetUserData(&kViewTypeUserDataKey, new ViewTypeUserData(type));
+ tab->SetUserData(&kViewTypeUserDataKey,
+ base::MakeUnique<ViewTypeUserData>(type));
ExtensionsBrowserClient::Get()->AttachExtensionTaskManagerTag(tab, type);
}
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_content_script_manager.cc ('k') | extensions/renderer/api_binding_hooks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698