| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_FETCHER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_FETCHER_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_FETCHER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_FETCHER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/optional.h" | 16 #include "base/optional.h" |
| 17 #include "base/time/tick_clock.h" | 17 #include "base/time/tick_clock.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "components/ntp_snippets/category.h" |
| 19 #include "components/ntp_snippets/remote/ntp_snippet.h" | 20 #include "components/ntp_snippets/remote/ntp_snippet.h" |
| 20 #include "components/ntp_snippets/remote/request_throttler.h" | 21 #include "components/ntp_snippets/remote/request_throttler.h" |
| 21 #include "components/translate/core/browser/language_model.h" | 22 #include "components/translate/core/browser/language_model.h" |
| 22 #include "google_apis/gaia/oauth2_token_service.h" | 23 #include "google_apis/gaia/oauth2_token_service.h" |
| 23 #include "net/url_request/url_fetcher_delegate.h" | 24 #include "net/url_request/url_fetcher_delegate.h" |
| 24 #include "net/url_request/url_request_context_getter.h" | 25 #include "net/url_request/url_request_context_getter.h" |
| 25 | 26 |
| 26 class PrefService; | 27 class PrefService; |
| 27 class SigninManagerBase; | 28 class SigninManagerBase; |
| 28 | 29 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // When a token request gets canceled, we want to retry once. | 271 // When a token request gets canceled, we want to retry once. |
| 271 bool oauth_token_retried_; | 272 bool oauth_token_retried_; |
| 272 | 273 |
| 273 base::WeakPtrFactory<NTPSnippetsFetcher> weak_ptr_factory_; | 274 base::WeakPtrFactory<NTPSnippetsFetcher> weak_ptr_factory_; |
| 274 | 275 |
| 275 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsFetcher); | 276 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsFetcher); |
| 276 }; | 277 }; |
| 277 } // namespace ntp_snippets | 278 } // namespace ntp_snippets |
| 278 | 279 |
| 279 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_FETCHER_H_ | 280 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_FETCHER_H_ |
| OLD | NEW |