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

Unified Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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
Index: chrome/browser/extensions/extension_tab_util.cc
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index ad3c5d4bce36d378d0a96e4bc80715bcf01759ec..68a27d537c29618d7377c406f8d11c37e2ded727 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -331,7 +331,7 @@ int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) {
}
// static
-scoped_ptr<api::tabs::Tab> ExtensionTabUtil::CreateTabObject(
+std::unique_ptr<api::tabs::Tab> ExtensionTabUtil::CreateTabObject(
WebContents* contents,
TabStripModel* tab_strip,
int tab_index,
@@ -343,7 +343,7 @@ scoped_ptr<api::tabs::Tab> ExtensionTabUtil::CreateTabObject(
(!extension || controller->IsVisibleToExtension(extension))) {
return controller->CreateTabObject(extension, tab_index);
}
- scoped_ptr<api::tabs::Tab> result =
+ std::unique_ptr<api::tabs::Tab> result =
CreateTabObject(contents, tab_strip, tab_index);
ScrubTabForExtension(extension, contents, result.get());
return result;
@@ -365,7 +365,7 @@ base::ListValue* ExtensionTabUtil::CreateTabList(
}
// static
-scoped_ptr<api::tabs::Tab> ExtensionTabUtil::CreateTabObject(
+std::unique_ptr<api::tabs::Tab> ExtensionTabUtil::CreateTabObject(
content::WebContents* contents,
TabStripModel* tab_strip,
int tab_index) {
@@ -378,7 +378,7 @@ scoped_ptr<api::tabs::Tab> ExtensionTabUtil::CreateTabObject(
if (!tab_strip)
ExtensionTabUtil::GetTabStripModel(contents, &tab_strip, &tab_index);
bool is_loading = contents->IsLoading();
- scoped_ptr<api::tabs::Tab> tab_object(new api::tabs::Tab);
+ std::unique_ptr<api::tabs::Tab> tab_object(new api::tabs::Tab);
tab_object->id.reset(new int(GetTabIdForExtensions(contents)));
tab_object->index = tab_index;
tab_object->window_id = GetWindowIdOfTab(contents);
@@ -412,10 +412,10 @@ scoped_ptr<api::tabs::Tab> ExtensionTabUtil::CreateTabObject(
}
// static
-scoped_ptr<api::tabs::MutedInfo> ExtensionTabUtil::CreateMutedInfo(
+std::unique_ptr<api::tabs::MutedInfo> ExtensionTabUtil::CreateMutedInfo(
content::WebContents* contents) {
DCHECK(contents);
- scoped_ptr<api::tabs::MutedInfo> info(new api::tabs::MutedInfo);
+ std::unique_ptr<api::tabs::MutedInfo> info(new api::tabs::MutedInfo);
info->muted = contents->IsAudioMuted();
switch (chrome::GetTabAudioMutedReason(contents)) {
case TabMutedReason::NONE:
@@ -627,7 +627,7 @@ bool ExtensionTabUtil::OpenOptionsPage(const Extension* extension,
// Force the options page to open in non-OTR window, because it won't be
// able to save settings from OTR.
- scoped_ptr<chrome::ScopedTabbedBrowserDisplayer> displayer;
+ std::unique_ptr<chrome::ScopedTabbedBrowserDisplayer> displayer;
if (browser->profile()->IsOffTheRecord()) {
displayer.reset(new chrome::ScopedTabbedBrowserDisplayer(
browser->profile()->GetOriginalProfile()));
« no previous file with comments | « chrome/browser/extensions/extension_tab_util.h ('k') | chrome/browser/extensions/extension_test_notification_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698