| OLD | NEW |
| 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 "chrome/browser/net/http_pipelining_compatibility_client.h" | 5 #include "chrome/browser/net/http_pipelining_compatibility_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 if (ContainsKey(original_samples_, name)) { | 197 if (ContainsKey(original_samples_, name)) { |
| 198 samples->Subtract(*(original_samples_[name])); | 198 samples->Subtract(*(original_samples_[name])); |
| 199 } | 199 } |
| 200 | 200 |
| 201 EXPECT_EQ(expected_count, samples->TotalCount()) << name; | 201 EXPECT_EQ(expected_count, samples->TotalCount()) << name; |
| 202 if (expected_count > 0) { | 202 if (expected_count > 0) { |
| 203 EXPECT_EQ(expected_count, samples->GetCount(expected_value)) << name; | 203 EXPECT_EQ(expected_count, samples->GetCount(expected_value)) << name; |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 MessageLoopForIO message_loop_; | 207 base::MessageLoopForIO message_loop_; |
| 208 net::SpawnedTestServer test_server_; | 208 net::SpawnedTestServer test_server_; |
| 209 net::TestURLRequestContextGetter* context_; | 209 net::TestURLRequestContextGetter* context_; |
| 210 content::TestBrowserThread io_thread_; | 210 content::TestBrowserThread io_thread_; |
| 211 | 211 |
| 212 private: | 212 private: |
| 213 scoped_ptr<HistogramSamples> GetHistogram(const char* name) { | 213 scoped_ptr<HistogramSamples> GetHistogram(const char* name) { |
| 214 scoped_ptr<HistogramSamples> samples; | 214 scoped_ptr<HistogramSamples> samples; |
| 215 HistogramBase* cached_histogram = NULL; | 215 HistogramBase* cached_histogram = NULL; |
| 216 HistogramBase* current_histogram = | 216 HistogramBase* current_histogram = |
| 217 base::StatisticsRecorder::FindHistogram(name); | 217 base::StatisticsRecorder::FindHistogram(name); |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 callback.WaitForResult(); | 588 callback.WaitForResult(); |
| 589 | 589 |
| 590 ExpectHistogramCount(1, false, FIELD_CANARY); | 590 ExpectHistogramCount(1, false, FIELD_CANARY); |
| 591 ExpectHistogramCount(0, false, FIELD_SUCCESS); | 591 ExpectHistogramCount(0, false, FIELD_SUCCESS); |
| 592 ExpectHistogramCount(0, true, FIELD_SUCCESS); | 592 ExpectHistogramCount(0, true, FIELD_SUCCESS); |
| 593 } | 593 } |
| 594 | 594 |
| 595 } // anonymous namespace | 595 } // anonymous namespace |
| 596 | 596 |
| 597 } // namespace chrome_browser_net | 597 } // namespace chrome_browser_net |
| OLD | NEW |