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

Side by Side Diff: chrome/browser/ui/webui/app_launcher_page_ui.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model_impl.cc ('k') | chrome/browser/ui/webui/devtools_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" 9 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
10 #include "chrome/browser/ui/webui/ntp/app_resource_cache_factory.h" 10 #include "chrome/browser/ui/webui/ntp/app_resource_cache_factory.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 resource->set_should_show_most_visited_page(false); 102 resource->set_should_show_most_visited_page(false);
103 resource->set_should_show_other_devices_menu(false); 103 resource->set_should_show_other_devices_menu(false);
104 resource->set_should_show_recently_closed_menu(false); 104 resource->set_should_show_recently_closed_menu(false);
105 105
106 content::RenderProcessHost* render_host = 106 content::RenderProcessHost* render_host =
107 content::RenderProcessHost::FromID(render_process_id); 107 content::RenderProcessHost::FromID(render_process_id);
108 bool is_incognito = render_host->GetBrowserContext()->IsOffTheRecord(); 108 bool is_incognito = render_host->GetBrowserContext()->IsOffTheRecord();
109 scoped_refptr<base::RefCountedMemory> html_bytes( 109 scoped_refptr<base::RefCountedMemory> html_bytes(
110 resource->GetNewTabHTML(is_incognito)); 110 resource->GetNewTabHTML(is_incognito));
111 111
112 callback.Run(html_bytes); 112 callback.Run(html_bytes.get());
113 } 113 }
114 114
115 std::string AppLauncherPageUI::HTMLSource::GetMimeType( 115 std::string AppLauncherPageUI::HTMLSource::GetMimeType(
116 const std::string& resource) const { 116 const std::string& resource) const {
117 return "text/html"; 117 return "text/html";
118 } 118 }
119 119
120 bool AppLauncherPageUI::HTMLSource::ShouldReplaceExistingSource() const { 120 bool AppLauncherPageUI::HTMLSource::ShouldReplaceExistingSource() const {
121 return false; 121 return false;
122 } 122 }
123 123
124 bool AppLauncherPageUI::HTMLSource::ShouldAddContentSecurityPolicy() const { 124 bool AppLauncherPageUI::HTMLSource::ShouldAddContentSecurityPolicy() const {
125 return false; 125 return false;
126 } 126 }
127 127
128 AppLauncherPageUI::HTMLSource::~HTMLSource() {} 128 AppLauncherPageUI::HTMLSource::~HTMLSource() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model_impl.cc ('k') | chrome/browser/ui/webui/devtools_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698