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

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

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.h
===================================================================
--- chrome/browser/search_engines/search_provider_install_state_message_filter.h (revision 68877)
+++ chrome/browser/search_engines/search_provider_install_state_message_filter.h (working copy)
@@ -2,39 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_DISPATCHER_HOST_H_
-#define CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_DISPATCHER_HOST_H_
+#ifndef CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_FILTER_H_
+#define CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_FILTER_H_
-#include "base/basictypes.h"
-#include "base/scoped_ptr.h"
-#include "base/task.h"
+#include "chrome/browser/browser_message_filter.h"
#include "chrome/browser/search_engines/search_provider_install_data.h"
-namespace IPC {
-class Message;
-}
-
class GURL;
class Profile;
-class ResourceMessageFilter;
struct ViewHostMsg_GetSearchProviderInstallState_Params;
// Handles messages regarding search provider install state on the I/O thread.
-class SearchProviderInstallStateDispatcherHost {
+class SearchProviderInstallStateMessageFilter : public BrowserMessageFilter {
public:
// Unlike the other methods, the constructor is called on the UI thread.
- SearchProviderInstallStateDispatcherHost(ResourceMessageFilter* ipc_sender,
- Profile* profile,
- int render_process_id);
- ~SearchProviderInstallStateDispatcherHost();
+ SearchProviderInstallStateMessageFilter(int render_process_id,
+ Profile* profile);
+ ~SearchProviderInstallStateMessageFilter();
- // Send a message to the renderer process.
- void Send(IPC::Message* message);
+ // BrowserMessageFilter implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok);
- // Called to possibly handle the incoming IPC message. Returns true if
- // handled.
- bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok);
-
private:
// Figures out the install state for the search provider.
ViewHostMsg_GetSearchProviderInstallState_Params
@@ -52,20 +41,17 @@
IPC::Message* reply_msg);
// Used to schedule invocations of ReplyWithProviderInstallState.
- ScopedRunnableMethodFactory<SearchProviderInstallStateDispatcherHost>
+ ScopedRunnableMethodFactory<SearchProviderInstallStateMessageFilter>
reply_with_provider_install_state_factory_;
// Used to do a load and get information about install states.
SearchProviderInstallData provider_data_;
- // Used to reply to messages.
- ResourceMessageFilter* ipc_sender_;
-
// Copied from the profile since the profile can't be accessed on the I/O
// thread.
const bool is_off_the_record_;
- DISALLOW_COPY_AND_ASSIGN(SearchProviderInstallStateDispatcherHost);
+ DISALLOW_COPY_AND_ASSIGN(SearchProviderInstallStateMessageFilter);
};
-#endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_DISPATCHER_HOST_H_
+#endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698