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

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

Issue 3117034: Skeleton of sync handler on the I/O thread for GetSearchProviderInstallState. (Closed)
Patch Set: Created 10 years, 4 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
Index: chrome/browser/search_engines/search_provider_install_state_dispatcher_host.h
diff --git a/chrome/browser/search_engines/search_provider_install_state_dispatcher_host.h b/chrome/browser/search_engines/search_provider_install_state_dispatcher_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..075684d35e705d7e8bc6772716477f36b50e40d6
--- /dev/null
+++ b/chrome/browser/search_engines/search_provider_install_state_dispatcher_host.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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_
+
+#include "base/basictypes.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 {
+ public:
+ SearchProviderInstallStateDispatcherHost(ResourceMessageFilter* ipc_sender,
sky 2010/08/23 16:00:29 Mention this is invoked on the UI thread.
+ Profile* profile);
+ ~SearchProviderInstallStateDispatcherHost();
+
+ // Send a message to the renderer process.
+ void Send(IPC::Message* message);
+
+ // 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
+ GetSearchProviderInstallState(const GURL& page_location,
+ const GURL& requested_host);
+
+ // Starts handling the message requesting the search provider install state.
+ void OnMsgGetSearchProviderInstallState(const GURL& page_location,
+ const GURL& requested_host,
+ IPC::Message* reply_msg);
+
+ // Sends the reply message about the search provider install state.
+ void ReplyWithProviderInstallState(
+ IPC::Message* reply_msg,
+ ViewHostMsg_GetSearchProviderInstallState_Params install_state);
+
+ ResourceMessageFilter* ipc_sender_;
+ const bool is_off_the_record_;
+
+ DISALLOW_COPY_AND_ASSIGN(SearchProviderInstallStateDispatcherHost);
+};
+
+#endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_DISPATCHER_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698