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

Side by Side Diff: net/url_request/url_request_throttler_unittest.cc

Issue 9147026: API for connection type (Ethernet/WIFI/WWAN ...) in NetworkChangeNotifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed a typo Created 8 years, 7 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 | « net/url_request/url_request_throttler_manager.cc ('k') | remoting/host/signaling_connector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/url_request/url_request_throttler_manager.h" 5 #include "net/url_request/url_request_throttler_manager.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/pickle.h" 9 #include "base/pickle.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 // Host doesn't really matter in this scenario so we skip it. 504 // Host doesn't really matter in this scenario so we skip it.
505 entry_before->UpdateWithResponse("", &failure_adapter); 505 entry_before->UpdateWithResponse("", &failure_adapter);
506 } 506 }
507 EXPECT_TRUE(entry_before->ShouldRejectRequest(0)); 507 EXPECT_TRUE(entry_before->ShouldRejectRequest(0));
508 508
509 switch (i) { 509 switch (i) {
510 case 0: 510 case 0:
511 manager.OnIPAddressChanged(); 511 manager.OnIPAddressChanged();
512 break; 512 break;
513 case 1: 513 case 1:
514 manager.OnOnlineStateChanged(true); 514 manager.OnConnectionTypeChanged(
515 net::NetworkChangeNotifier::CONNECTION_UNKNOWN);
515 break; 516 break;
516 case 2: 517 case 2:
517 manager.OnOnlineStateChanged(false); 518 manager.OnConnectionTypeChanged(
519 net::NetworkChangeNotifier::CONNECTION_NONE);
518 break; 520 break;
519 default: 521 default:
520 FAIL(); 522 FAIL();
521 } 523 }
522 524
523 scoped_refptr<net::URLRequestThrottlerEntryInterface> entry_after = 525 scoped_refptr<net::URLRequestThrottlerEntryInterface> entry_after =
524 manager.RegisterRequestUrl(GURL("http://www.example.com/")); 526 manager.RegisterRequestUrl(GURL("http://www.example.com/"));
525 EXPECT_FALSE(entry_after->ShouldRejectRequest(0)); 527 EXPECT_FALSE(entry_after->ShouldRejectRequest(0));
526 } 528 }
527 } 529 }
528 530
529 } // namespace net 531 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_throttler_manager.cc ('k') | remoting/host/signaling_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698