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

Side by Side Diff: chrome/browser/ui/webui/app_launcher_page_ui.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/webui/app_launcher_page_ui.h" 5 #include "chrome/browser/ui/webui/app_launcher_page_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 web_ui->AddMessageHandler(new MetricsHandler()); 52 web_ui->AddMessageHandler(new MetricsHandler());
53 } 53 }
54 54
55 #if defined(ENABLE_THEMES) 55 #if defined(ENABLE_THEMES)
56 // The theme handler can require some CPU, so do it after hooking up the most 56 // The theme handler can require some CPU, so do it after hooking up the most
57 // visited handler. This allows the DB query for the new tab thumbs to happen 57 // visited handler. This allows the DB query for the new tab thumbs to happen
58 // earlier. 58 // earlier.
59 web_ui->AddMessageHandler(new ThemeHandler()); 59 web_ui->AddMessageHandler(new ThemeHandler());
60 #endif 60 #endif
61 61
62 scoped_ptr<HTMLSource> html_source( 62 std::unique_ptr<HTMLSource> html_source(
63 new HTMLSource(GetProfile()->GetOriginalProfile())); 63 new HTMLSource(GetProfile()->GetOriginalProfile()));
64 content::URLDataSource::Add(GetProfile(), html_source.release()); 64 content::URLDataSource::Add(GetProfile(), html_source.release());
65 } 65 }
66 66
67 AppLauncherPageUI::~AppLauncherPageUI() { 67 AppLauncherPageUI::~AppLauncherPageUI() {
68 } 68 }
69 69
70 // static 70 // static
71 base::RefCountedMemory* AppLauncherPageUI::GetFaviconResourceBytes( 71 base::RefCountedMemory* AppLauncherPageUI::GetFaviconResourceBytes(
72 ui::ScaleFactor scale_factor) { 72 ui::ScaleFactor scale_factor) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 bool AppLauncherPageUI::HTMLSource::ShouldReplaceExistingSource() const { 130 bool AppLauncherPageUI::HTMLSource::ShouldReplaceExistingSource() const {
131 return false; 131 return false;
132 } 132 }
133 133
134 bool AppLauncherPageUI::HTMLSource::ShouldAddContentSecurityPolicy() const { 134 bool AppLauncherPageUI::HTMLSource::ShouldAddContentSecurityPolicy() const {
135 return false; 135 return false;
136 } 136 }
137 137
138 AppLauncherPageUI::HTMLSource::~HTMLSource() {} 138 AppLauncherPageUI::HTMLSource::~HTMLSource() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/app_launcher_login_handler.h ('k') | chrome/browser/ui/webui/app_list/start_page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698