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

Side by Side Diff: content/browser/devtools/protocol/network_handler.cc

Issue 2837943006: [WIP] Support PerformanceResourceTiming for Service Worker Navigation Preload (Closed)
Patch Set: clean up Created 3 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 | « no previous file | content/renderer/service_worker/service_worker_context_client.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/devtools/protocol/network_handler.h" 5 #include "content/browser/devtools/protocol/network_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/barrier_closure.h" 9 #include "base/barrier_closure.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 if (completion_status.error_code != net::OK) { 697 if (completion_status.error_code != net::OK) {
698 frontend_->LoadingFailed( 698 frontend_->LoadingFailed(
699 request_id, 699 request_id,
700 base::TimeTicks::Now().ToInternalValue() / 700 base::TimeTicks::Now().ToInternalValue() /
701 static_cast<double>(base::Time::kMicrosecondsPerSecond), 701 static_cast<double>(base::Time::kMicrosecondsPerSecond),
702 Page::ResourceTypeEnum::Other, 702 Page::ResourceTypeEnum::Other,
703 net::ErrorToString(completion_status.error_code), 703 net::ErrorToString(completion_status.error_code),
704 completion_status.error_code == net::Error::ERR_ABORTED); 704 completion_status.error_code == net::Error::ERR_ABORTED);
705 } 705 }
706 frontend_->LoadingFinished( 706 frontend_->LoadingFinished(
707 request_id, base::TimeTicks::Now().ToInternalValue() / 707 request_id,
708 static_cast<double>(base::Time::kMicrosecondsPerSecond), 708 completion_status.completion_time.ToInternalValue() /
709 static_cast<double>(base::Time::kMicrosecondsPerSecond),
709 completion_status.encoded_data_length); 710 completion_status.encoded_data_length);
710 } 711 }
711 712
712 void NetworkHandler::NavigationFailed( 713 void NetworkHandler::NavigationFailed(
713 const CommonNavigationParams& common_params, 714 const CommonNavigationParams& common_params,
714 const BeginNavigationParams& begin_params, 715 const BeginNavigationParams& begin_params,
715 net::Error error_code) { 716 net::Error error_code) {
716 if (!enabled_) 717 if (!enabled_)
717 return; 718 return;
718 719
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 static_cast<double>(base::Time::kMicrosecondsPerSecond), 756 static_cast<double>(base::Time::kMicrosecondsPerSecond),
756 Page::ResourceTypeEnum::Document, error_string, cancelled); 757 Page::ResourceTypeEnum::Document, error_string, cancelled);
757 } 758 }
758 759
759 std::string NetworkHandler::UserAgentOverride() const { 760 std::string NetworkHandler::UserAgentOverride() const {
760 return enabled_ ? user_agent_ : std::string(); 761 return enabled_ ? user_agent_ : std::string();
761 } 762 }
762 763
763 } // namespace protocol 764 } // namespace protocol
764 } // namespace content 765 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/service_worker/service_worker_context_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698