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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 14039004: Add int params to URLDataSource::StartDataRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: It's not called a renderder. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/thumbnail_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index c1168b7ef6aa4f35868538293b6d7a22caf5209f..971bdff9e67f7d6490418d44b8137d532ac0bd72 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -26,6 +26,7 @@
#include "components/user_prefs/pref_registry_syncable.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_contents.h"
@@ -318,7 +319,8 @@ std::string NewTabUI::NewTabHTMLSource::GetSource() const {
void NewTabUI::NewTabHTMLSource::StartDataRequest(
const std::string& path,
- bool is_incognito,
+ int render_process_id,
+ int render_view_id,
const content::URLDataSource::GotDataCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -345,9 +347,13 @@ void NewTabUI::NewTabHTMLSource::StartDataRequest(
#if !defined(OS_ANDROID)
NOTREACHED() << path << " should not have been requested on the NTP";
#endif
+ callback.Run(NULL);
return;
}
+ content::RenderProcessHost* render_host =
+ content::RenderProcessHost::FromID(render_process_id);
+ bool is_incognito = render_host->GetBrowserContext()->IsOffTheRecord();
scoped_refptr<base::RefCountedMemory> html_bytes(
NTPResourceCacheFactory::GetForProfile(profile_)->
GetNewTabHTML(is_incognito));
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/thumbnail_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698