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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_host_impl.h

Issue 8375039: Create a content::UrlFetcher interface that lives in content/public/common and convert users to i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SPELLCHECKER_SPELLCHECK_HOST_IMPL_H_ 5 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_IMPL_H_
6 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_IMPL_H_ 6 #define CHROME_BROWSER_SPELLCHECKER_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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Returns a metrics counter associated with this object, 98 // Returns a metrics counter associated with this object,
99 // or null when metrics recording is disabled. 99 // or null when metrics recording is disabled.
100 virtual SpellCheckHostMetrics* GetMetrics() const; 100 virtual SpellCheckHostMetrics* GetMetrics() const;
101 101
102 // Returns true if the dictionary is ready to use. 102 // Returns true if the dictionary is ready to use.
103 virtual bool IsReady() const; 103 virtual bool IsReady() const;
104 104
105 // content::URLFetcherDelegate implementation. Called when we finish 105 // content::URLFetcherDelegate implementation. Called when we finish
106 // downloading the spellcheck dictionary; saves the dictionary to |data_|. 106 // downloading the spellcheck dictionary; saves the dictionary to |data_|.
107 virtual void OnURLFetchComplete(const URLFetcher* source); 107 virtual void OnURLFetchComplete(const content::URLFetcher* source);
108 108
109 // NotificationProfile implementation. 109 // NotificationProfile implementation.
110 virtual void Observe(int type, 110 virtual void Observe(int type,
111 const content::NotificationSource& source, 111 const content::NotificationSource& source,
112 const content::NotificationDetails& details); 112 const content::NotificationDetails& details);
113 113
114 // Saves |data_| to disk. Run on the file thread. 114 // Saves |data_| to disk. Run on the file thread.
115 void SaveDictionaryData(); 115 void SaveDictionaryData();
116 116
117 // Verifies the specified BDict file exists and it is sane. This function 117 // Verifies the specified BDict file exists and it is sane. This function
(...skipping 24 matching lines...) Expand all
142 bool use_platform_spellchecker_; 142 bool use_platform_spellchecker_;
143 143
144 // Data received from the dictionary download. 144 // Data received from the dictionary download.
145 std::string data_; 145 std::string data_;
146 146
147 // Used for downloading the dictionary file. We don't hold a reference, and 147 // Used for downloading the dictionary file. We don't hold a reference, and
148 // it is only valid to use it on the UI thread. 148 // it is only valid to use it on the UI thread.
149 net::URLRequestContextGetter* request_context_getter_; 149 net::URLRequestContextGetter* request_context_getter_;
150 150
151 // Used for downloading the dictionary file. 151 // Used for downloading the dictionary file.
152 scoped_ptr<URLFetcher> fetcher_; 152 scoped_ptr<content::URLFetcher> fetcher_;
153 153
154 content::NotificationRegistrar registrar_; 154 content::NotificationRegistrar registrar_;
155 155
156 // An optional metrics counter given by the constructor. 156 // An optional metrics counter given by the constructor.
157 SpellCheckHostMetrics* metrics_; 157 SpellCheckHostMetrics* metrics_;
158 158
159 DISALLOW_COPY_AND_ASSIGN(SpellCheckHostImpl); 159 DISALLOW_COPY_AND_ASSIGN(SpellCheckHostImpl);
160 }; 160 };
161 161
162 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_IMPL_H_ 162 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_fetcher.cc ('k') | chrome/browser/spellchecker/spellcheck_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698