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/ntp_snippets_fetcher.h" | 5 #include "components/ntp_snippets/remote/ntp_snippets_fetcher.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "base/test/histogram_tester.h" | 13 #include "base/test/histogram_tester.h" |
14 #include "base/test/test_mock_time_task_runner.h" | 14 #include "base/test/test_mock_time_task_runner.h" |
15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "components/ntp_snippets/category_factory.h" | 18 #include "components/ntp_snippets/category_factory.h" |
19 #include "components/ntp_snippets/ntp_snippets_constants.h" | 19 #include "components/ntp_snippets/ntp_snippets_constants.h" |
20 #include "components/ntp_snippets/remote/ntp_snippet.h" | 20 #include "components/ntp_snippets/remote/ntp_snippet.h" |
21 #include "components/ntp_snippets/user_classifier.h" | 21 #include "components/ntp_snippets/user_classifier.h" |
22 #include "components/prefs/testing_pref_service.h" | 22 #include "components/prefs/testing_pref_service.h" |
23 #include "components/signin/core/browser/account_tracker_service.h" | 23 #include "components/signin/core/browser/account_tracker_service.h" |
24 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 24 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
25 #include "components/signin/core/browser/fake_signin_manager.h" | 25 #include "components/signin/core/browser/fake_signin_manager.h" |
26 #include "components/signin/core/browser/test_signin_client.h" | 26 #include "components/signin/core/browser/test_signin_client.h" |
27 #include "components/variations/entropy_provider.h" | 27 #include "components/variations/entropy_provider.h" |
28 #include "components/variations/variations_associated_data.h" | 28 #include "components/variations/variations_params_manager.h" |
29 #include "net/url_request/test_url_fetcher_factory.h" | 29 #include "net/url_request/test_url_fetcher_factory.h" |
30 #include "net/url_request/url_request_test_util.h" | 30 #include "net/url_request/url_request_test_util.h" |
31 #include "testing/gmock/include/gmock/gmock.h" | 31 #include "testing/gmock/include/gmock/gmock.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 | 33 |
34 namespace ntp_snippets { | 34 namespace ntp_snippets { |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 using testing::_; | 38 using testing::_; |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 const NTPSnippetsFetcher::OptionalFetchedCategories& fetched_categories) { | 1001 const NTPSnippetsFetcher::OptionalFetchedCategories& fetched_categories) { |
1002 if (fetched_categories) { | 1002 if (fetched_categories) { |
1003 // Matchers above aren't any more precise than this, so this is sufficient | 1003 // Matchers above aren't any more precise than this, so this is sufficient |
1004 // for test-failure diagnostics. | 1004 // for test-failure diagnostics. |
1005 return os << "list with " << fetched_categories->size() << " elements"; | 1005 return os << "list with " << fetched_categories->size() << " elements"; |
1006 } | 1006 } |
1007 return os << "null"; | 1007 return os << "null"; |
1008 } | 1008 } |
1009 | 1009 |
1010 } // namespace ntp_snippets | 1010 } // namespace ntp_snippets |
OLD | NEW |