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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } // namespace chrome 96 } // namespace chrome
97 97
98 namespace { 98 namespace {
99 99
100 const int kAutoLaunchDefaultTimeoutMilliSec = 50; 100 const int kAutoLaunchDefaultTimeoutMilliSec = 50;
101 101
102 #if defined(OS_WIN) 102 #if defined(OS_WIN)
103 void CreateShortcutInWebAppDir( 103 void CreateShortcutInWebAppDir(
104 const base::FilePath& app_data_dir, 104 const base::FilePath& app_data_dir,
105 base::Callback<void(const base::FilePath&)> callback, 105 base::Callback<void(const base::FilePath&)> callback,
106 scoped_ptr<web_app::ShortcutInfo> info) { 106 std::unique_ptr<web_app::ShortcutInfo> info) {
107 content::BrowserThread::PostTaskAndReplyWithResult( 107 content::BrowserThread::PostTaskAndReplyWithResult(
108 content::BrowserThread::FILE, FROM_HERE, 108 content::BrowserThread::FILE, FROM_HERE,
109 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir, 109 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir,
110 base::Passed(&info)), 110 base::Passed(&info)),
111 callback); 111 callback);
112 } 112 }
113 #endif 113 #endif
114 114
115 void PopulateUsers(const base::FilePath& active_profile_path, 115 void PopulateUsers(const base::FilePath& active_profile_path,
116 app_list::AppListViewDelegate::Users* users) { 116 app_list::AppListViewDelegate::Users* users) {
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 GetCustomLauncherPageUrls(profile_, &custom_launcher_page_urls); 346 GetCustomLauncherPageUrls(profile_, &custom_launcher_page_urls);
347 if (custom_launcher_page_urls.empty()) 347 if (custom_launcher_page_urls.empty())
348 return; 348 return;
349 349
350 for (std::vector<GURL>::const_iterator it = custom_launcher_page_urls.begin(); 350 for (std::vector<GURL>::const_iterator it = custom_launcher_page_urls.begin();
351 it != custom_launcher_page_urls.end(); 351 it != custom_launcher_page_urls.end();
352 ++it) { 352 ++it) {
353 std::string extension_id = it->host(); 353 std::string extension_id = it->host();
354 apps::CustomLauncherPageContents* page_contents = 354 apps::CustomLauncherPageContents* page_contents =
355 new apps::CustomLauncherPageContents( 355 new apps::CustomLauncherPageContents(
356 scoped_ptr<extensions::AppDelegate>(new ChromeAppDelegate(false)), 356 std::unique_ptr<extensions::AppDelegate>(
357 new ChromeAppDelegate(false)),
357 extension_id); 358 extension_id);
358 page_contents->Initialize(profile_, *it); 359 page_contents->Initialize(profile_, *it);
359 custom_page_contents_.push_back(page_contents); 360 custom_page_contents_.push_back(page_contents);
360 } 361 }
361 362
362 std::string first_launcher_page_app_id = custom_launcher_page_urls[0].host(); 363 std::string first_launcher_page_app_id = custom_launcher_page_urls[0].host();
363 const extensions::Extension* extension = 364 const extensions::Extension* extension =
364 extensions::ExtensionRegistry::Get(profile_) 365 extensions::ExtensionRegistry::Get(profile_)
365 ->GetExtensionById(first_launcher_page_app_id, 366 ->GetExtensionById(first_launcher_page_app_id,
366 extensions::ExtensionRegistry::EVERYTHING); 367 extensions::ExtensionRegistry::EVERYTHING);
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 861
861 // SigninManagerFactory is not a leaky singleton (unlike this class), and 862 // SigninManagerFactory is not a leaky singleton (unlike this class), and
862 // its destructor will check that it has no remaining observers. 863 // its destructor will check that it has no remaining observers.
863 scoped_observer_.RemoveAll(); 864 scoped_observer_.RemoveAll();
864 SigninManagerFactory::GetInstance()->RemoveObserver(this); 865 SigninManagerFactory::GetInstance()->RemoveObserver(this);
865 break; 866 break;
866 default: 867 default:
867 NOTREACHED(); 868 NOTREACHED();
868 } 869 }
869 } 870 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.h ('k') | chrome/browser/ui/app_list/arc/arc_app_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698