| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_FILT
ER_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_FILT
ER_H_ |
| 6 #define CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_FILT
ER_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_FILT
ER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/search_engines/search_provider_install_data.h" | 8 #include "chrome/browser/search_engines/search_provider_install_data.h" |
| 9 #include "chrome/common/search_provider.h" | 9 #include "chrome/common/search_provider.h" |
| 10 #include "content/browser/browser_message_filter.h" | 10 #include "content/browser/browser_message_filter.h" |
| 11 | 11 |
| 12 class GURL; | 12 class GURL; |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 // Handles messages regarding search provider install state on the I/O thread. | 15 // Handles messages regarding search provider install state on the I/O thread. |
| 16 class SearchProviderInstallStateMessageFilter : public BrowserMessageFilter { | 16 class SearchProviderInstallStateMessageFilter : public BrowserMessageFilter { |
| 17 public: | 17 public: |
| 18 // Unlike the other methods, the constructor is called on the UI thread. | 18 // Unlike the other methods, the constructor is called on the UI thread. |
| 19 SearchProviderInstallStateMessageFilter(int render_process_id, | 19 SearchProviderInstallStateMessageFilter(int render_process_id, |
| 20 Profile* profile); | 20 Profile* profile); |
| 21 ~SearchProviderInstallStateMessageFilter(); | 21 virtual ~SearchProviderInstallStateMessageFilter(); |
| 22 | 22 |
| 23 // BrowserMessageFilter implementation. | 23 // BrowserMessageFilter implementation. |
| 24 virtual bool OnMessageReceived(const IPC::Message& message, | 24 virtual bool OnMessageReceived(const IPC::Message& message, |
| 25 bool* message_was_ok); | 25 bool* message_was_ok); |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 // Figures out the install state for the search provider. | 28 // Figures out the install state for the search provider. |
| 29 search_provider::InstallState GetSearchProviderInstallState( | 29 search_provider::InstallState GetSearchProviderInstallState( |
| 30 const GURL& page_location, | 30 const GURL& page_location, |
| 31 const GURL& requested_host); | 31 const GURL& requested_host); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 48 SearchProviderInstallData provider_data_; | 48 SearchProviderInstallData provider_data_; |
| 49 | 49 |
| 50 // Copied from the profile since the profile can't be accessed on the I/O | 50 // Copied from the profile since the profile can't be accessed on the I/O |
| 51 // thread. | 51 // thread. |
| 52 const bool is_off_the_record_; | 52 const bool is_off_the_record_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(SearchProviderInstallStateMessageFilter); | 54 DISALLOW_COPY_AND_ASSIGN(SearchProviderInstallStateMessageFilter); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 #endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_F
ILTER_H_ | 57 #endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_PROVIDER_INSTALL_STATE_MESSAGE_F
ILTER_H_ |
| OLD | NEW |