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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 899573002: Add WiFi SSID getter to NetworkChangeNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <deque> 5 #include <deque>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 namespace prerender { 130 namespace prerender {
131 131
132 namespace { 132 namespace {
133 133
134 class MockNetworkChangeNotifierWIFI : public NetworkChangeNotifier { 134 class MockNetworkChangeNotifierWIFI : public NetworkChangeNotifier {
135 public: 135 public:
136 ConnectionType GetCurrentConnectionType() const override { 136 ConnectionType GetCurrentConnectionType() const override {
137 return NetworkChangeNotifier::CONNECTION_WIFI; 137 return NetworkChangeNotifier::CONNECTION_WIFI;
138 } 138 }
139 std::string GetCurrentWiFiSSID() const override { return ""; }
139 }; 140 };
140 141
141 class MockNetworkChangeNotifier4G : public NetworkChangeNotifier { 142 class MockNetworkChangeNotifier4G : public NetworkChangeNotifier {
142 public: 143 public:
143 ConnectionType GetCurrentConnectionType() const override { 144 ConnectionType GetCurrentConnectionType() const override {
144 return NetworkChangeNotifier::CONNECTION_4G; 145 return NetworkChangeNotifier::CONNECTION_4G;
145 } 146 }
147 std::string GetCurrentWiFiSSID() const override { return ""; }
146 }; 148 };
147 149
148 // Constants used in the test HTML files. 150 // Constants used in the test HTML files.
149 const char* kReadyTitle = "READY"; 151 const char* kReadyTitle = "READY";
150 const char* kPassTitle = "PASS"; 152 const char* kPassTitle = "PASS";
151 153
152 std::string CreateClientRedirect(const std::string& dest_url) { 154 std::string CreateClientRedirect(const std::string& dest_url) {
153 const char* const kClientRedirectBase = "client-redirect?"; 155 const char* const kClientRedirectBase = "client-redirect?";
154 return kClientRedirectBase + net::EscapeQueryParamValue(dest_url, false); 156 return kClientRedirectBase + net::EscapeQueryParamValue(dest_url, false);
155 } 157 }
(...skipping 4167 matching lines...) Expand 10 before | Expand all | Expand 10 after
4323 TestShouldDisableLocalPredictorPreferenceNetworkMatrix( 4325 TestShouldDisableLocalPredictorPreferenceNetworkMatrix(
4324 true /*preference_wifi_network_wifi*/, 4326 true /*preference_wifi_network_wifi*/,
4325 true /*preference_wifi_network_4g*/, 4327 true /*preference_wifi_network_4g*/,
4326 true /*preference_always_network_wifi*/, 4328 true /*preference_always_network_wifi*/,
4327 false /*preference_always_network_4g*/, 4329 false /*preference_always_network_4g*/,
4328 true /*preference_never_network_wifi*/, 4330 true /*preference_never_network_wifi*/,
4329 true /*preference_never_network_4g*/); 4331 true /*preference_never_network_4g*/);
4330 } 4332 }
4331 4333
4332 } // namespace prerender 4334 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prefetch/prefetch_browsertest.cc ('k') | chrome/browser/speech/extension_api/tts_extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698