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 #include "chrome/browser/search/suggestions/suggestions_service.h" | 5 #include "components/suggestions/suggestions_service.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <sstream> | 8 #include <sstream> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "chrome/browser/search/suggestions/blacklist_store.h" | 16 #include "components/suggestions/blacklist_store.h" |
17 #include "chrome/browser/search/suggestions/image_manager.h" | 17 #include "components/suggestions/image_manager.h" |
18 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h" | 18 #include "components/suggestions/proto/suggestions.pb.h" |
19 #include "chrome/browser/search/suggestions/suggestions_service_factory.h" | 19 #include "components/suggestions/suggestions_store.h" |
20 #include "chrome/browser/search/suggestions/suggestions_store.h" | |
21 #include "components/variations/entropy_provider.h" | 20 #include "components/variations/entropy_provider.h" |
22 #include "components/variations/variations_associated_data.h" | 21 #include "components/variations/variations_associated_data.h" |
23 #include "content/public/test/test_browser_thread_bundle.h" | 22 #include "content/public/test/test_browser_thread_bundle.h" |
24 #include "net/http/http_response_headers.h" | 23 #include "net/http/http_response_headers.h" |
25 #include "net/http/http_status_code.h" | 24 #include "net/http/http_status_code.h" |
26 #include "net/url_request/test_url_fetcher_factory.h" | 25 #include "net/url_request/test_url_fetcher_factory.h" |
27 #include "net/url_request/url_request_status.h" | 26 #include "net/url_request/url_request_status.h" |
28 #include "net/url_request/url_request_test_util.h" | 27 #include "net/url_request/url_request_test_util.h" |
29 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
30 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 // Delay increases on failure. | 487 // Delay increases on failure. |
489 suggestions_service->UpdateBlacklistDelay(false); | 488 suggestions_service->UpdateBlacklistDelay(false); |
490 EXPECT_GT(suggestions_service->blacklist_delay(), initial_delay); | 489 EXPECT_GT(suggestions_service->blacklist_delay(), initial_delay); |
491 | 490 |
492 // Delay resets on success. | 491 // Delay resets on success. |
493 suggestions_service->UpdateBlacklistDelay(true); | 492 suggestions_service->UpdateBlacklistDelay(true); |
494 EXPECT_EQ(initial_delay, suggestions_service->blacklist_delay()); | 493 EXPECT_EQ(initial_delay, suggestions_service->blacklist_delay()); |
495 } | 494 } |
496 | 495 |
497 } // namespace suggestions | 496 } // namespace suggestions |
OLD | NEW |