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

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

Issue 666563003: Delete the last remaining use of OVERRIDE and remove its definition. (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
« no previous file with comments | « base/compiler_specific.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 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:
48 ResourcePrefetchCommonTest(); 48 ResourcePrefetchCommonTest();
49 virtual void SetUp() OVERRIDE; 49 void SetUp() override;
50 50
51 void CreateTestFieldTrial(const std::string& name, 51 void CreateTestFieldTrial(const std::string& name,
52 const std::string& group_name) { 52 const std::string& group_name) {
53 base::FieldTrial* trial = base::FieldTrialList::CreateFieldTrial( 53 base::FieldTrial* trial = base::FieldTrialList::CreateFieldTrial(
54 name, group_name); 54 name, group_name);
55 trial->group(); 55 trial->group();
56 } 56 }
57 57
58 void SetPreference(NetworkPredictionOptions value) { 58 void SetPreference(NetworkPredictionOptions value) {
59 profile_->GetPrefs()->SetInteger(prefs::kNetworkPredictionOptions, value); 59 profile_->GetPrefs()->SetInteger(prefs::kNetworkPredictionOptions, value);
(...skipping 263 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 | « base/compiler_specific.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698