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 #include "components/ntp_snippets/remote/remote_suggestions_fetcher.h" | 5 #include "components/ntp_snippets/remote/remote_suggestions_fetcher.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
14 #include "base/metrics/sparse_histogram.h" | 14 #include "base/metrics/sparse_histogram.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/time/default_clock.h" | 18 #include "base/time/default_clock.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "base/values.h" | 20 #include "base/values.h" |
21 #include "components/data_use_measurement/core/data_use_user_data.h" | 21 #include "components/data_use_measurement/core/data_use_user_data.h" |
22 #include "components/ntp_snippets/category.h" | 22 #include "components/ntp_snippets/category.h" |
23 #include "components/ntp_snippets/features.h" | 23 #include "components/ntp_snippets/features.h" |
24 #include "components/ntp_snippets/ntp_snippets_constants.h" | 24 #include "components/ntp_snippets/ntp_snippets_constants.h" |
25 #include "components/ntp_snippets/remote/request_params.h" | 25 #include "components/ntp_snippets/remote/request_params.h" |
26 #include "components/ntp_snippets/user_classifier.h" | 26 #include "components/ntp_snippets/user_classifier.h" |
27 #include "components/signin/core/browser/signin_manager.h" | 27 #include "components/signin/core/browser/signin_manager.h" |
28 #include "components/signin/core/browser/signin_manager_base.h" | 28 #include "components/signin/core/browser/signin_manager_base.h" |
| 29 #include "components/strings/grit/components_strings.h" |
29 #include "components/variations/variations_associated_data.h" | 30 #include "components/variations/variations_associated_data.h" |
30 #include "grit/components_strings.h" | |
31 #include "net/url_request/url_fetcher.h" | 31 #include "net/url_request/url_fetcher.h" |
32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
33 | 33 |
34 using net::URLFetcher; | 34 using net::URLFetcher; |
35 using net::URLRequestContextGetter; | 35 using net::URLRequestContextGetter; |
36 using net::HttpRequestHeaders; | 36 using net::HttpRequestHeaders; |
37 using net::URLRequestStatus; | 37 using net::URLRequestStatus; |
38 using translate::LanguageModel; | 38 using translate::LanguageModel; |
39 | 39 |
40 namespace ntp_snippets { | 40 namespace ntp_snippets { |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 interactive_request); | 581 interactive_request); |
582 case UserClassifier::UserClass::ACTIVE_SUGGESTIONS_CONSUMER: | 582 case UserClassifier::UserClass::ACTIVE_SUGGESTIONS_CONSUMER: |
583 return request_throttler_active_suggestions_consumer_ | 583 return request_throttler_active_suggestions_consumer_ |
584 .DemandQuotaForRequest(interactive_request); | 584 .DemandQuotaForRequest(interactive_request); |
585 } | 585 } |
586 NOTREACHED(); | 586 NOTREACHED(); |
587 return false; | 587 return false; |
588 } | 588 } |
589 | 589 |
590 } // namespace ntp_snippets | 590 } // namespace ntp_snippets |
OLD | NEW |