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

Side by Side Diff: chrome/common/extensions/extension_localization_peer.h

Issue 7602023: Use a monotonic clock (TimeTicks) to report network times to WebCore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add random test Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 webkit_glue::ResourceLoaderBridge::Peer* peer, 27 webkit_glue::ResourceLoaderBridge::Peer* peer,
28 IPC::Message::Sender* message_sender, 28 IPC::Message::Sender* message_sender,
29 const std::string& mime_type, 29 const std::string& mime_type,
30 const GURL& request_url); 30 const GURL& request_url);
31 31
32 // ResourceLoaderBridge::Peer methods. 32 // ResourceLoaderBridge::Peer methods.
33 virtual void OnUploadProgress(uint64 position, uint64 size) OVERRIDE; 33 virtual void OnUploadProgress(uint64 position, uint64 size) OVERRIDE;
34 virtual bool OnReceivedRedirect( 34 virtual bool OnReceivedRedirect(
35 const GURL& new_url, 35 const GURL& new_url,
36 const webkit_glue::ResourceResponseInfo& info, 36 const webkit_glue::ResourceResponseInfo& info,
37 const base::TimeTicks& request_start_time,
38 const base::TimeTicks& response_start_time,
37 bool* has_new_first_party_for_cookies, 39 bool* has_new_first_party_for_cookies,
38 GURL* new_first_party_for_cookies) OVERRIDE; 40 GURL* new_first_party_for_cookies) OVERRIDE;
39 virtual void OnReceivedResponse( 41 virtual void OnReceivedResponse(
40 const webkit_glue::ResourceResponseInfo& info) OVERRIDE; 42 const webkit_glue::ResourceResponseInfo& info,
43 const base::TimeTicks& request_start_time,
44 const base::TimeTicks& response_start_time);
41 virtual void OnDownloadedData(int len) OVERRIDE {} 45 virtual void OnDownloadedData(int len) OVERRIDE {}
42 virtual void OnReceivedData(const char* data, 46 virtual void OnReceivedData(const char* data,
43 int data_length, 47 int data_length,
44 int encoded_data_length) OVERRIDE; 48 int encoded_data_length) OVERRIDE;
45 virtual void OnCompletedRequest(const net::URLRequestStatus& status, 49 virtual void OnCompletedRequest(
46 const std::string& security_info, 50 const net::URLRequestStatus& status,
47 const base::Time& completion_time) OVERRIDE; 51 const std::string& security_info,
52 const base::TimeTicks& completion_time) OVERRIDE;
48 53
49 private: 54 private:
50 friend class ExtensionLocalizationPeerTest; 55 friend class ExtensionLocalizationPeerTest;
51 56
52 // Use CreateExtensionLocalizationPeer to create an instance. 57 // Use CreateExtensionLocalizationPeer to create an instance.
53 ExtensionLocalizationPeer( 58 ExtensionLocalizationPeer(
54 webkit_glue::ResourceLoaderBridge::Peer* peer, 59 webkit_glue::ResourceLoaderBridge::Peer* peer,
55 IPC::Message::Sender* message_sender, 60 IPC::Message::Sender* message_sender,
56 const GURL& request_url); 61 const GURL& request_url);
57 62
(...skipping 10 matching lines...) Expand all
68 // Sends ExtensionHostMsg_GetMessageBundle message to the browser to fetch 73 // Sends ExtensionHostMsg_GetMessageBundle message to the browser to fetch
69 // message catalog. 74 // message catalog.
70 IPC::Message::Sender* message_sender_; 75 IPC::Message::Sender* message_sender_;
71 76
72 // Buffer for incoming data. We wait until OnCompletedRequest before using it. 77 // Buffer for incoming data. We wait until OnCompletedRequest before using it.
73 std::string data_; 78 std::string data_;
74 79
75 // Original request URL. 80 // Original request URL.
76 GURL request_url_; 81 GURL request_url_;
77 82
83 // When the request started and the initial response was returned.
84 base::TimeTicks request_start_time_;
85 base::TimeTicks response_start_time_;
86
78 private: 87 private:
79 DISALLOW_COPY_AND_ASSIGN(ExtensionLocalizationPeer); 88 DISALLOW_COPY_AND_ASSIGN(ExtensionLocalizationPeer);
80 }; 89 };
81 90
82 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_ 91 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698