| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ | 5 #ifndef COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ |
| 6 #define COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ | 6 #define COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // This will be false if the logo hasn't been read from the cache yet. | 202 // This will be false if the logo hasn't been read from the cache yet. |
| 203 // |cached_logo_| may be NULL even if |is_cached_logo_valid_| is true, if no | 203 // |cached_logo_| may be NULL even if |is_cached_logo_valid_| is true, if no |
| 204 // logo is cached. | 204 // logo is cached. |
| 205 bool is_cached_logo_valid_; | 205 bool is_cached_logo_valid_; |
| 206 | 206 |
| 207 // The URLFetcher currently fetching the logo. NULL when not fetching. | 207 // The URLFetcher currently fetching the logo. NULL when not fetching. |
| 208 scoped_ptr<net::URLFetcher> fetcher_; | 208 scoped_ptr<net::URLFetcher> fetcher_; |
| 209 | 209 |
| 210 // The list of observers to be notified when the logo is available. This | 210 // The list of observers to be notified when the logo is available. This |
| 211 // should be empty when the state is IDLE. | 211 // should be empty when the state is IDLE. |
| 212 ObserverList<LogoObserver> logo_observers_; | 212 base::ObserverList<LogoObserver> logo_observers_; |
| 213 | 213 |
| 214 scoped_ptr<LogoDelegate> logo_delegate_; | 214 scoped_ptr<LogoDelegate> logo_delegate_; |
| 215 | 215 |
| 216 // The cache used to persist the logo on disk. Used only on the file thread. | 216 // The cache used to persist the logo on disk. Used only on the file thread. |
| 217 LogoCache* logo_cache_; | 217 LogoCache* logo_cache_; |
| 218 | 218 |
| 219 // Clock used to determine current time. Can be overridden in tests. | 219 // Clock used to determine current time. Can be overridden in tests. |
| 220 scoped_ptr<base::Clock> clock_; | 220 scoped_ptr<base::Clock> clock_; |
| 221 | 221 |
| 222 // The SequencedTaskRunner on which file system operations will be run. | 222 // The SequencedTaskRunner on which file system operations will be run. |
| 223 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 223 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
| 224 | 224 |
| 225 // The TaskRunner on which the server's response will be parsed. | 225 // The TaskRunner on which the server's response will be parsed. |
| 226 scoped_refptr<base::TaskRunner> background_task_runner_; | 226 scoped_refptr<base::TaskRunner> background_task_runner_; |
| 227 | 227 |
| 228 // The URLRequestContextGetter used for network requests. | 228 // The URLRequestContextGetter used for network requests. |
| 229 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 229 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 230 | 230 |
| 231 base::WeakPtrFactory<LogoTracker> weak_ptr_factory_; | 231 base::WeakPtrFactory<LogoTracker> weak_ptr_factory_; |
| 232 | 232 |
| 233 DISALLOW_COPY_AND_ASSIGN(LogoTracker); | 233 DISALLOW_COPY_AND_ASSIGN(LogoTracker); |
| 234 }; | 234 }; |
| 235 | 235 |
| 236 } // namespace search_provider_logos | 236 } // namespace search_provider_logos |
| 237 | 237 |
| 238 #endif // COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ | 238 #endif // COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ |
| OLD | NEW |