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

Side by Side Diff: content/browser/loader/resource_loader.h

Issue 1130343006: Don't share ResourceDispatcherHostImpl's timer for reporting upload progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@safari-backend
Patch Set: Created 5 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
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 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ 6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/loader/resource_handler.h" 10 #include "content/browser/loader/resource_handler.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 int process_id, 95 int process_id,
96 SignedCertificateTimestampIDStatusList* sct_ids); 96 SignedCertificateTimestampIDStatusList* sct_ids);
97 void CompleteResponseStarted(); 97 void CompleteResponseStarted();
98 void StartReading(bool is_continuation); 98 void StartReading(bool is_continuation);
99 void ResumeReading(); 99 void ResumeReading();
100 void ReadMore(int* bytes_read); 100 void ReadMore(int* bytes_read);
101 // Passes a read result to the handler. 101 // Passes a read result to the handler.
102 void CompleteRead(int bytes_read); 102 void CompleteRead(int bytes_read);
103 void ResponseCompleted(); 103 void ResponseCompleted();
104 void CallDidFinishLoading(); 104 void CallDidFinishLoading();
105 void ScheduleReportUploadProgress();
105 void RecordHistograms(); 106 void RecordHistograms();
106 107
107 bool is_deferred() const { return deferred_stage_ != DEFERRED_NONE; } 108 bool is_deferred() const { return deferred_stage_ != DEFERRED_NONE; }
108 109
109 // Used for categorizing loading of prefetches for reporting in histograms. 110 // Used for categorizing loading of prefetches for reporting in histograms.
110 // NOTE: This enumeration is used in histograms, so please do not add entries 111 // NOTE: This enumeration is used in histograms, so please do not add entries
111 // in the middle. 112 // in the middle.
112 enum PrefetchStatus { 113 enum PrefetchStatus {
113 STATUS_UNDEFINED, 114 STATUS_UNDEFINED,
114 STATUS_SUCCESS_FROM_CACHE, 115 STATUS_SUCCESS_FROM_CACHE,
(...skipping 14 matching lines...) Expand all
129 DeferredStage deferred_stage_; 130 DeferredStage deferred_stage_;
130 131
131 scoped_ptr<net::URLRequest> request_; 132 scoped_ptr<net::URLRequest> request_;
132 scoped_ptr<ResourceHandler> handler_; 133 scoped_ptr<ResourceHandler> handler_;
133 ResourceLoaderDelegate* delegate_; 134 ResourceLoaderDelegate* delegate_;
134 135
135 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_; 136 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_;
136 scoped_ptr<SSLClientAuthHandler> ssl_client_auth_handler_; 137 scoped_ptr<SSLClientAuthHandler> ssl_client_auth_handler_;
137 138
138 uint64 last_upload_position_; 139 uint64 last_upload_position_;
139 bool waiting_for_upload_progress_ack_;
140 base::TimeTicks last_upload_ticks_; 140 base::TimeTicks last_upload_ticks_;
141 base::TimeTicks read_deferral_start_time_; 141 base::TimeTicks read_deferral_start_time_;
142 142
143 // Indicates that we are in a state of being transferred to a new downstream 143 // Indicates that we are in a state of being transferred to a new downstream
144 // consumer. We are waiting for a notification to complete the transfer, at 144 // consumer. We are waiting for a notification to complete the transfer, at
145 // which point we'll receive a new ResourceHandler. 145 // which point we'll receive a new ResourceHandler.
146 bool is_transferring_; 146 bool is_transferring_;
147 147
148 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; 148 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_;
149 149
150 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); 150 DISALLOW_COPY_AND_ASSIGN(ResourceLoader);
151 }; 151 };
152 152
153 } // namespace content 153 } // namespace content
154 154
155 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ 155 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698