| Index: chrome/browser/renderer_host/browser_render_process_host.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/browser_render_process_host.cc (revision 35751)
|
| +++ chrome/browser/renderer_host/browser_render_process_host.cc (working copy)
|
| @@ -735,9 +735,10 @@
|
| void BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) {
|
| mark_child_process_activity_time();
|
| if (msg.routing_id() == MSG_ROUTING_CONTROL) {
|
| - // Dispatch control messages.
|
| + // 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,
|
| @@ -761,7 +762,7 @@
|
| return;
|
| }
|
|
|
| - // Dispatch incoming messages to the appropriate TabContents.
|
| + // dispatch incoming messages to the appropriate TabContents
|
| IPC::Channel::Listener* listener = GetListenerByID(msg.routing_id());
|
| if (!listener) {
|
| if (msg.is_sync()) {
|
| @@ -835,6 +836,18 @@
|
| // 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);
|
|
|