| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SPELLCHECK_HOST_IMPL_H_ | 5 #ifndef CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_ |
| 6 #define CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_ | 6 #define CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // URLFetcher::Delegate implementation. Called when we finish downloading the | 95 // URLFetcher::Delegate implementation. Called when we finish downloading the |
| 96 // spellcheck dictionary; saves the dictionary to |data_|. | 96 // spellcheck dictionary; saves the dictionary to |data_|. |
| 97 virtual void OnURLFetchComplete(const URLFetcher* source, | 97 virtual void OnURLFetchComplete(const URLFetcher* source, |
| 98 const GURL& url, | 98 const GURL& url, |
| 99 const net::URLRequestStatus& status, | 99 const net::URLRequestStatus& status, |
| 100 int response_code, | 100 int response_code, |
| 101 const net::ResponseCookies& cookies, | 101 const net::ResponseCookies& cookies, |
| 102 const std::string& data); | 102 const std::string& data); |
| 103 | 103 |
| 104 // NotificationObserver implementation. | 104 // NotificationObserver implementation. |
| 105 virtual void Observe(NotificationType type, | 105 virtual void Observe(int type, |
| 106 const NotificationSource& source, | 106 const NotificationSource& source, |
| 107 const NotificationDetails& details); | 107 const NotificationDetails& details); |
| 108 | 108 |
| 109 // Saves |data_| to disk. Run on the file thread. | 109 // Saves |data_| to disk. Run on the file thread. |
| 110 void SaveDictionaryData(); | 110 void SaveDictionaryData(); |
| 111 | 111 |
| 112 // May be NULL. | 112 // May be NULL. |
| 113 SpellCheckHostObserver* observer_; | 113 SpellCheckHostObserver* observer_; |
| 114 | 114 |
| 115 // The desired location of the dictionary file (whether or not t exists yet). | 115 // The desired location of the dictionary file (whether or not t exists yet). |
| (...skipping 28 matching lines...) Expand all Loading... |
| 144 // Used for downloading the dictionary file. | 144 // Used for downloading the dictionary file. |
| 145 scoped_ptr<URLFetcher> fetcher_; | 145 scoped_ptr<URLFetcher> fetcher_; |
| 146 | 146 |
| 147 NotificationRegistrar registrar_; | 147 NotificationRegistrar registrar_; |
| 148 | 148 |
| 149 // An optional metrics counter given by the constructor. | 149 // An optional metrics counter given by the constructor. |
| 150 SpellCheckHostMetrics* metrics_; | 150 SpellCheckHostMetrics* metrics_; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 #endif // CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_ | 153 #endif // CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_ |
| OLD | NEW |