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

Side by Side Diff: chrome/browser/ui/webui/app_list/start_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_list/start_page_ui.h" 5 #include "chrome/browser/ui/webui/app_list/start_page_ui.h"
6 6
7 #include <memory>
8
7 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
9 #include "base/memory/ref_counted_memory.h" 11 #include "base/memory/ref_counted_memory.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/sys_info.h" 12 #include "base/sys_info.h"
12 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/webui/app_list/start_page_handler.h" 15 #include "chrome/browser/ui/webui/app_list/start_page_handler.h"
15 #include "chrome/common/extensions/extension_constants.h" 16 #include "chrome/common/extensions/extension_constants.h"
16 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
17 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/web_ui.h" 19 #include "content/public/browser/web_ui.h"
19 #include "content/public/browser/web_ui_data_source.h" 20 #include "content/public/browser/web_ui_data_source.h"
20 #include "extensions/browser/extension_system.h" 21 #include "extensions/browser/extension_system.h"
21 #include "extensions/common/extension.h" 22 #include "extensions/common/extension.h"
22 #include "grit/browser_resources.h" 23 #include "grit/browser_resources.h"
23 24
24 namespace app_list { 25 namespace app_list {
25 26
26 StartPageUI::StartPageUI(content::WebUI* web_ui) 27 StartPageUI::StartPageUI(content::WebUI* web_ui)
27 : content::WebUIController(web_ui) { 28 : content::WebUIController(web_ui) {
28 web_ui->AddMessageHandler(new StartPageHandler); 29 web_ui->AddMessageHandler(new StartPageHandler);
29 InitDataSource(); 30 InitDataSource();
30 } 31 }
31 32
32 StartPageUI::~StartPageUI() {} 33 StartPageUI::~StartPageUI() {}
33 34
34 void StartPageUI::InitDataSource() { 35 void StartPageUI::InitDataSource() {
35 scoped_ptr<content::WebUIDataSource> source( 36 std::unique_ptr<content::WebUIDataSource> source(
36 content::WebUIDataSource::Create(chrome::kChromeUIAppListStartPageHost)); 37 content::WebUIDataSource::Create(chrome::kChromeUIAppListStartPageHost));
37 38
38 source->SetJsonPath("strings.js"); 39 source->SetJsonPath("strings.js");
39 40
40 source->AddResourcePath("start_page.css", IDR_APP_LIST_START_PAGE_CSS); 41 source->AddResourcePath("start_page.css", IDR_APP_LIST_START_PAGE_CSS);
41 source->AddResourcePath("start_page.js", IDR_APP_LIST_START_PAGE_JS); 42 source->AddResourcePath("start_page.js", IDR_APP_LIST_START_PAGE_JS);
42 source->SetDefaultResource(IDR_APP_LIST_START_PAGE_HTML); 43 source->SetDefaultResource(IDR_APP_LIST_START_PAGE_HTML);
43 44
44 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui()), source.release()); 45 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui()), source.release());
45 } 46 }
46 47
47 } // namespace app_list 48 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_handler.cc ('k') | chrome/browser/ui/webui/browsing_history_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698