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

Unified Diff: chrome/browser/search_engines/search_provider_install_state_message_filter.cc

Issue 5698008: Switch a bunch of remaining filters to derive from BrowserMessageFilters so t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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/search_engines/search_provider_install_state_message_filter.cc
===================================================================
--- chrome/browser/search_engines/search_provider_install_state_message_filter.cc (revision 68877)
+++ chrome/browser/search_engines/search_provider_install_state_message_filter.cc (working copy)
@@ -2,55 +2,45 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/search_engines/search_provider_install_state_dispatcher_host.h"
+#include "chrome/browser/search_engines/search_provider_install_state_message_filter.h"
#include "base/logging.h"
-#include "chrome/browser/browser_thread.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
-#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
-#include "ipc/ipc_message.h"
#include "googleurl/src/gurl.h"
-SearchProviderInstallStateDispatcherHost::
-SearchProviderInstallStateDispatcherHost(
- ResourceMessageFilter* ipc_sender,
- Profile* profile,
- int render_process_id)
+SearchProviderInstallStateMessageFilter::
+SearchProviderInstallStateMessageFilter(
+ int render_process_id,
+ Profile* profile)
: ALLOW_THIS_IN_INITIALIZER_LIST(
reply_with_provider_install_state_factory_(this)),
provider_data_(profile->GetWebDataService(Profile::EXPLICIT_ACCESS),
NotificationType::RENDERER_PROCESS_TERMINATED,
Source<RenderProcessHost>(
RenderProcessHost::FromID(render_process_id))),
- ipc_sender_(ipc_sender),
is_off_the_record_(profile->IsOffTheRecord()) {
- // This is initialized by ResourceMessageFilter. Do not add any non-trivial
+ // This is initialized by BrowserRenderProcessHost. Do not add any non-trivial
// initialization here. Instead do it lazily when required.
- DCHECK(ipc_sender);
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
-SearchProviderInstallStateDispatcherHost::
-~SearchProviderInstallStateDispatcherHost() {
+SearchProviderInstallStateMessageFilter::
+~SearchProviderInstallStateMessageFilter() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
-void SearchProviderInstallStateDispatcherHost::Send(IPC::Message* message) {
- ipc_sender_->Send(message);
-}
-
-bool SearchProviderInstallStateDispatcherHost::OnMessageReceived(
+bool SearchProviderInstallStateMessageFilter::OnMessageReceived(
const IPC::Message& message,
bool* message_was_ok) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP_EX(SearchProviderInstallStateDispatcherHost, message,
+ IPC_BEGIN_MESSAGE_MAP_EX(SearchProviderInstallStateMessageFilter, message,
*message_was_ok)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetSearchProviderInstallState,
OnMsgGetSearchProviderInstallState)
@@ -60,7 +50,7 @@
}
ViewHostMsg_GetSearchProviderInstallState_Params
-SearchProviderInstallStateDispatcherHost::GetSearchProviderInstallState(
+SearchProviderInstallStateMessageFilter::GetSearchProviderInstallState(
const GURL& page_location,
const GURL& requested_host) {
GURL requested_origin = requested_host.GetOrigin();
@@ -95,20 +85,20 @@
}
void
-SearchProviderInstallStateDispatcherHost::OnMsgGetSearchProviderInstallState(
+SearchProviderInstallStateMessageFilter::OnMsgGetSearchProviderInstallState(
const GURL& page_location,
const GURL& requested_host,
IPC::Message* reply_msg) {
provider_data_.CallWhenLoaded(
reply_with_provider_install_state_factory_.NewRunnableMethod(
- &SearchProviderInstallStateDispatcherHost::
+ &SearchProviderInstallStateMessageFilter::
ReplyWithProviderInstallState,
page_location,
requested_host,
reply_msg));
}
-void SearchProviderInstallStateDispatcherHost::ReplyWithProviderInstallState(
+void SearchProviderInstallStateMessageFilter::ReplyWithProviderInstallState(
const GURL& page_location,
const GURL& requested_host,
IPC::Message* reply_msg) {

Powered by Google App Engine
This is Rietveld 408576698