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

Side by Side Diff: chrome/browser/net/http_pipelining_compatibility_client.cc

Issue 140893013: Clean up dependencies for disk_cache histogram_macros.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix fat finger Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('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 "chrome/browser/net/http_pipelining_compatibility_client.h" 5 #include "chrome/browser/net/http_pipelining_compatibility_client.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 StartTestRequests(); 359 StartTestRequests();
360 } else { 360 } else {
361 finished_callback_.Run(0); 361 finished_callback_.Run(0);
362 } 362 }
363 } 363 }
364 364
365 void HttpPipeliningCompatibilityClient::OnRequestFinished( 365 void HttpPipeliningCompatibilityClient::OnRequestFinished(
366 int request_id, internal::PipelineTestRequest::Status status) { 366 int request_id, internal::PipelineTestRequest::Status status) {
367 // The CACHE_HISTOGRAM_* macros are used, because they allow dynamic metric 367 // The CACHE_HISTOGRAM_* macros are used, because they allow dynamic metric
368 // names. 368 // names.
369 // TODO(gavinp): Clean up this dependency by moving the needed functionality
370 // into base/.
369 CACHE_HISTOGRAM_ENUMERATION(GetMetricName(request_id, "Status"), 371 CACHE_HISTOGRAM_ENUMERATION(GetMetricName(request_id, "Status"),
370 status, 372 status,
371 internal::PipelineTestRequest::STATUS_MAX); 373 internal::PipelineTestRequest::STATUS_MAX);
372 374
373 ++num_finished_; 375 ++num_finished_;
374 if (status == internal::PipelineTestRequest::STATUS_SUCCESS) { 376 if (status == internal::PipelineTestRequest::STATUS_SUCCESS) {
375 ++num_succeeded_; 377 ++num_succeeded_;
376 } 378 }
377 if (num_finished_ == requests_.size()) { 379 if (num_finished_ == requests_.size()) {
378 UMA_HISTOGRAM_BOOLEAN("NetConnectivity.Pipeline.Success", 380 UMA_HISTOGRAM_BOOLEAN("NetConnectivity.Pipeline.Success",
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 532
531 content::BrowserThread::PostTask( 533 content::BrowserThread::PostTask(
532 content::BrowserThread::IO, 534 content::BrowserThread::IO,
533 FROM_HERE, 535 FROM_HERE,
534 base::Bind(&CollectPipeliningCapabilityStatsOnIOThread, 536 base::Bind(&CollectPipeliningCapabilityStatsOnIOThread,
535 pipeline_test_server, 537 pipeline_test_server,
536 io_thread)); 538 io_thread));
537 } 539 }
538 540
539 } // namespace chrome_browser_net 541 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698