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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/ui/app_list/arc/arc_app_list_prefs.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
index 7258c8bc70761da9558a2ed485fe1a8e9862f709..771294a9e914f0d2fedd35dfc4a98e0fe2f62c0b 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
@@ -192,7 +192,7 @@ void ArcAppListPrefs::RequestIcon(const std::string& app_id,
return;
}
- scoped_ptr<AppInfo> app_info = GetApp(app_id);
+ std::unique_ptr<AppInfo> app_info = GetApp(app_id);
if (!app_info) {
VLOG(2) << "Failed to get app info: " << app_id << ".";
return;
@@ -226,12 +226,12 @@ std::vector<std::string> ArcAppListPrefs::GetAppIds() const {
return ids;
}
-scoped_ptr<ArcAppListPrefs::AppInfo> ArcAppListPrefs::GetApp(
+std::unique_ptr<ArcAppListPrefs::AppInfo> ArcAppListPrefs::GetApp(
const std::string& app_id) const {
const base::DictionaryValue* app = nullptr;
const base::DictionaryValue* apps = prefs_->GetDictionary(prefs::kArcApps);
if (!apps || !apps->GetDictionaryWithoutPathExpansion(app_id, &app))
- return scoped_ptr<AppInfo>();
+ return std::unique_ptr<AppInfo>();
std::string name;
std::string package_name;
@@ -253,12 +253,9 @@ scoped_ptr<ArcAppListPrefs::AppInfo> ArcAppListPrefs::GetApp(
}
}
- scoped_ptr<AppInfo> app_info(new AppInfo(name,
- package_name,
- activity,
- last_launch_time,
- sticky,
- ready_apps_.count(app_id) > 0));
+ std::unique_ptr<AppInfo> app_info(new AppInfo(name, package_name, activity,
+ last_launch_time, sticky,
+ ready_apps_.count(app_id) > 0));
return app_info;
}
@@ -325,7 +322,7 @@ void ArcAppListPrefs::AddApp(const arc::AppInfo& app) {
bool was_registered = IsRegistered(app_id);
if (was_registered) {
- scoped_ptr<ArcAppListPrefs::AppInfo> app_old_info = GetApp(app_id);
+ std::unique_ptr<ArcAppListPrefs::AppInfo> app_old_info = GetApp(app_id);
if (app.name != app_old_info->name) {
FOR_EACH_OBSERVER(Observer, observer_list_,
OnAppNameUpdated(app_id, app.name));
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_list_prefs.h ('k') | chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698