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

Side by Side Diff: chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/search/launcher_search/launcher_search_icon _image_loader.h" 5 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon _image_loader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h" 10 #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h"
(...skipping 12 matching lines...) Expand all
23 23
24 } // namespace 24 } // namespace
25 25
26 namespace app_list { 26 namespace app_list {
27 27
28 LauncherSearchIconImageLoader::LauncherSearchIconImageLoader( 28 LauncherSearchIconImageLoader::LauncherSearchIconImageLoader(
29 const GURL& icon_url, 29 const GURL& icon_url,
30 Profile* profile, 30 Profile* profile,
31 const extensions::Extension* extension, 31 const extensions::Extension* extension,
32 const int icon_dimension, 32 const int icon_dimension,
33 scoped_ptr<chromeos::launcher_search_provider::ErrorReporter> 33 std::unique_ptr<chromeos::launcher_search_provider::ErrorReporter>
34 error_reporter) 34 error_reporter)
35 : profile_(profile), 35 : profile_(profile),
36 extension_(extension), 36 extension_(extension),
37 icon_url_(icon_url), 37 icon_url_(icon_url),
38 icon_size_(icon_dimension, icon_dimension), 38 icon_size_(icon_dimension, icon_dimension),
39 error_reporter_(std::move(error_reporter)) {} 39 error_reporter_(std::move(error_reporter)) {}
40 40
41 LauncherSearchIconImageLoader::~LauncherSearchIconImageLoader() { 41 LauncherSearchIconImageLoader::~LauncherSearchIconImageLoader() {
42 } 42 }
43 43
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (icon_url_.spec().size() <= max_size) 156 if (icon_url_.spec().size() <= max_size)
157 return icon_url_.spec(); 157 return icon_url_.spec();
158 158
159 std::string truncated_url; 159 std::string truncated_url;
160 base::TruncateUTF8ToByteSize(icon_url_.spec(), max_size - 3, &truncated_url); 160 base::TruncateUTF8ToByteSize(icon_url_.spec(), max_size - 3, &truncated_url);
161 truncated_url.append("..."); 161 truncated_url.append("...");
162 return truncated_url; 162 return truncated_url;
163 } 163 }
164 164
165 } // namespace app_list 165 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698