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

Unified Diff: chrome/browser/ui/search/search_ipc_router.cc

Issue 410533002: Merge 278958 "Discard ChromeViewHostMsg_SearchBox* IPCs if they ..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985/src
Patch Set: Created 6 years, 5 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/search/search.cc ('k') | chrome/browser/ui/search/search_ipc_router_policy_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_ipc_router.cc
diff --git a/chrome/browser/ui/search/search_ipc_router.cc b/chrome/browser/ui/search/search_ipc_router.cc
index 09b1a72b1fc942cd7e65df60ee8087502b430791..541ee35be0aa14d26ec0d661374a32c015d193f4 100644
--- a/chrome/browser/ui/search/search_ipc_router.cc
+++ b/chrome/browser/ui/search/search_ipc_router.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/search/search_ipc_router.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/search.h"
#include "chrome/common/render_messages.h"
#include "content/public/browser/web_contents.h"
@@ -143,6 +144,11 @@ void SearchIPCRouter::OnTabDeactivated() {
}
bool SearchIPCRouter::OnMessageReceived(const IPC::Message& message) {
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents()->GetBrowserContext());
+ if (!chrome::IsRenderedInInstantProcess(web_contents(), profile))
+ return false;
+
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(SearchIPCRouter, message)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_InstantSupportDetermined,
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/ui/search/search_ipc_router_policy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698