Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(942)

Side by Side Diff: chrome/browser/predictors/resource_prefetch_common_unittest.cc

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/metrics/field_trial.h" 6 #include "base/metrics/field_trial.h"
7 #include "base/metrics/statistics_recorder.h" 7 #include "base/metrics/statistics_recorder.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/net/prediction_options.h" 9 #include "chrome/browser/net/prediction_options.h"
10 #include "chrome/browser/predictors/resource_prefetch_common.h" 10 #include "chrome/browser/predictors/resource_prefetch_common.h"
11 #include "chrome/browser/predictors/resource_prefetch_predictor.h" 11 #include "chrome/browser/predictors/resource_prefetch_predictor.h"
12 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" 12 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "chrome/test/base/in_process_browser_test.h" 16 #include "chrome/test/base/in_process_browser_test.h"
17 #include "chrome/test/base/testing_profile.h" 17 #include "chrome/test/base/testing_profile.h"
18 #include "components/variations/entropy_provider.h" 18 #include "components/variations/entropy_provider.h"
19 #include "content/public/test/browser_test_utils.h" 19 #include "content/public/test/browser_test_utils.h"
20 #include "content/public/test/test_browser_thread.h" 20 #include "content/public/test/test_browser_thread.h"
21 #include "net/base/network_change_notifier.h" 21 #include "net/base/network_change_notifier.h"
22 22
23 using chrome_browser_net::NetworkPredictionOptions; 23 using chrome_browser_net::NetworkPredictionOptions;
24 using net::NetworkChangeNotifier; 24 using net::NetworkChangeNotifier;
25 25
26 namespace { 26 namespace {
27 27
28 class MockNetworkChangeNotifierWIFI : public NetworkChangeNotifier { 28 class MockNetworkChangeNotifierWIFI : public NetworkChangeNotifier {
29 public: 29 public:
30 virtual ConnectionType GetCurrentConnectionType() const OVERRIDE { 30 ConnectionType GetCurrentConnectionType() const OVERRIDE {
31 return NetworkChangeNotifier::CONNECTION_WIFI; 31 return NetworkChangeNotifier::CONNECTION_WIFI;
32 } 32 }
33 }; 33 };
34 34
35 class MockNetworkChangeNotifier4G : public NetworkChangeNotifier { 35 class MockNetworkChangeNotifier4G : public NetworkChangeNotifier {
36 public: 36 public:
37 virtual ConnectionType GetCurrentConnectionType() const OVERRIDE { 37 ConnectionType GetCurrentConnectionType() const OVERRIDE {
38 return NetworkChangeNotifier::CONNECTION_4G; 38 return NetworkChangeNotifier::CONNECTION_4G;
39 } 39 }
40 }; 40 };
41 41
42 } // namespace 42 } // namespace
43 43
44 namespace predictors { 44 namespace predictors {
45 45
46 class ResourcePrefetchCommonTest : public testing::Test { 46 class ResourcePrefetchCommonTest : public testing::Test {
47 public: 47 public:
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 scoped_ptr<NetworkChangeNotifier> mock(new MockNetworkChangeNotifierWIFI); 323 scoped_ptr<NetworkChangeNotifier> mock(new MockNetworkChangeNotifierWIFI);
324 TestIsPrefetchLearning(config); 324 TestIsPrefetchLearning(config);
325 } 325 }
326 { 326 {
327 scoped_ptr<NetworkChangeNotifier> mock(new MockNetworkChangeNotifier4G); 327 scoped_ptr<NetworkChangeNotifier> mock(new MockNetworkChangeNotifier4G);
328 TestIsPrefetchLearning(config); 328 TestIsPrefetchLearning(config);
329 } 329 }
330 } 330 }
331 331
332 } // namespace predictors 332 } // namespace predictors
OLDNEW
« no previous file with comments | « chrome/browser/predictors/predictor_database_factory.h ('k') | chrome/browser/predictors/resource_prefetch_predictor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698