summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/browser_render_process_host.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 17:38:19 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 17:38:19 +0000
commitcf3f387e6dd8072cb884964923e978bb198bca12 (patch)
tree358fbdcfc310baba78a7b87bfc48a4a402ae968e /chrome/browser/renderer_host/browser_render_process_host.cc
parentae1b251286512eded9ff13561ea84a645878859b (diff)
downloadchromium_src-cf3f387e6dd8072cb884964923e978bb198bca12.zip
chromium_src-cf3f387e6dd8072cb884964923e978bb198bca12.tar.gz
chromium_src-cf3f387e6dd8072cb884964923e978bb198bca12.tar.bz2
Revert 36362 - It breaks NACLTests and Chrome Frame Tests
3rd attempt at landing the language detection on page load. A memory error has been fixed in the CLD library in the meantime. This should hopefully fixes the crashers in the reliability tests. Note that this version is actually simpler than the original review since the detection is now performed in the renderer. (So the CLD code runs sandboxed.) Original review: http://codereview.chromium.org/492024/show BUG=30662 TEST=Run the unittests. Review URL: http://codereview.chromium.org/518075 TBR=jcampan@chromium.org Review URL: http://codereview.chromium.org/546062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/browser_render_process_host.cc')
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index dadeb53..32c141c 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -738,6 +738,7 @@ void BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) {
// Dispatch control messages.
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdatedCacheStats,
OnUpdatedCacheStats)
IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged,
@@ -835,6 +836,18 @@ void BrowserRenderProcessHost::OnChannelError() {
// TODO(darin): clean this up
}
+void BrowserRenderProcessHost::OnPageContents(const GURL& url,
+ int32 page_id,
+ const std::wstring& contents) {
+ Profile* p = profile();
+ if (!p || p->IsOffTheRecord())
+ return;
+
+ HistoryService* hs = p->GetHistoryService(Profile::IMPLICIT_ACCESS);
+ if (hs)
+ hs->SetPageContents(url, contents);
+}
+
void BrowserRenderProcessHost::OnUpdatedCacheStats(
const WebCache::UsageStats& stats) {
WebCacheManager::GetInstance()->ObserveStats(id(), stats);