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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_request_job.cc

Issue 2452593003: Fix incorrectly reported UMA OfflinePages.AggregatedRequestResult (Closed)
Patch Set: Fix tests Created 4 years, 1 month 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 | « no previous file | chrome/browser/android/offline_pages/offline_page_request_job_unittest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/android/offline_pages/offline_page_request_job.h" 5 #include "chrome/browser/android/offline_pages/offline_page_request_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 SelectPageForOnlineURL(online_url, offline_header, network_state, 428 SelectPageForOnlineURL(online_url, offline_header, network_state,
429 web_contents_getter, tab_id_getter, job); 429 web_contents_getter, tab_id_getter, job);
430 } 430 }
431 431
432 } // namespace 432 } // namespace
433 433
434 // static 434 // static
435 void OfflinePageRequestJob::ReportAggregatedRequestResult( 435 void OfflinePageRequestJob::ReportAggregatedRequestResult(
436 AggregatedRequestResult result) { 436 AggregatedRequestResult result) {
437 UMA_HISTOGRAM_ENUMERATION("OfflinePages.AggregatedRequestResult", 437 UMA_HISTOGRAM_ENUMERATION("OfflinePages.AggregatedRequestResult2",
438 static_cast<int>(result), 438 static_cast<int>(result),
439 static_cast<int>(AggregatedRequestResult::AGGREGATED_REQUEST_RESULT_MAX)); 439 static_cast<int>(AggregatedRequestResult::AGGREGATED_REQUEST_RESULT_MAX));
440 } 440 }
441 441
442 // static 442 // static
443 OfflinePageRequestJob* OfflinePageRequestJob::Create( 443 OfflinePageRequestJob* OfflinePageRequestJob::Create(
444 net::URLRequest* request, 444 net::URLRequest* request,
445 net::NetworkDelegate* network_delegate, 445 net::NetworkDelegate* network_delegate,
446 previews::PreviewsDecider* previews_decider) { 446 previews::PreviewsDecider* previews_decider) {
447 const content::ResourceRequestInfo* resource_request_info = 447 const content::ResourceRequestInfo* resource_request_info =
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 file_path_ = offline_file_path; 555 file_path_ = offline_file_path;
556 URLRequestFileJob::Start(); 556 URLRequestFileJob::Start();
557 } 557 }
558 558
559 void OfflinePageRequestJob::SetDelegateForTesting( 559 void OfflinePageRequestJob::SetDelegateForTesting(
560 std::unique_ptr<Delegate> delegate) { 560 std::unique_ptr<Delegate> delegate) {
561 delegate_ = std::move(delegate); 561 delegate_ = std::move(delegate);
562 } 562 }
563 563
564 } // namespace offline_pages 564 } // namespace offline_pages
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698