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

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: Changing struct -> ints. 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
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 4ba1c7845f2c269269593baef30a28f503fd6473..9ec5d135c85a179002f0e99610471499eb157e0d 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -27,6 +27,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"
@@ -315,7 +316,8 @@ std::string NewTabUI::NewTabHTMLSource::GetSource() {
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,6 +347,10 @@ void NewTabUI::NewTabHTMLSource::StartDataRequest(
return;
}
+ content::RenderProcessHost* render_host =
+ content::RenderProcessHost::FromID(render_process_id);
+ DCHECK(render_host != NULL);
jam 2013/04/17 00:45:09 ditto
Jered 2013/04/17 01:03:08 Done.
+ const bool is_incognito = render_host->GetBrowserContext()->IsOffTheRecord();
scoped_refptr<base::RefCountedMemory> html_bytes(
NTPResourceCacheFactory::GetForProfile(profile_)->
GetNewTabHTML(is_incognito));

Powered by Google App Engine
This is Rietveld 408576698