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

Side by Side Diff: content/browser/loader/stream_resource_handler.cc

Issue 1301103002: moved upload progress logic from ResourceLoader to AsyncResourceHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: single quotes, nits, and return success on success Created 5 years, 3 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/loader/stream_resource_handler.h" 5 #include "content/browser/loader/stream_resource_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 StreamResourceHandler::StreamResourceHandler(net::URLRequest* request, 11 StreamResourceHandler::StreamResourceHandler(net::URLRequest* request,
12 StreamRegistry* registry, 12 StreamRegistry* registry,
13 const GURL& origin) 13 const GURL& origin)
14 : ResourceHandler(request) { 14 : ResourceHandler(request) {
15 writer_.InitializeStream(registry, origin); 15 writer_.InitializeStream(registry, origin);
16 } 16 }
17 17
18 StreamResourceHandler::~StreamResourceHandler() { 18 StreamResourceHandler::~StreamResourceHandler() {
19 } 19 }
20 20
21 void StreamResourceHandler::SetController(ResourceController* controller) { 21 void StreamResourceHandler::SetController(ResourceController* controller) {
22 writer_.set_controller(controller); 22 writer_.set_controller(controller);
23 ResourceHandler::SetController(controller); 23 ResourceHandler::SetController(controller);
24 } 24 }
25 25
26 bool StreamResourceHandler::OnUploadProgress(uint64 position,
27 uint64 size) {
28 return true;
29 }
30
31 bool StreamResourceHandler::OnRequestRedirected( 26 bool StreamResourceHandler::OnRequestRedirected(
32 const net::RedirectInfo& redirect_info, 27 const net::RedirectInfo& redirect_info,
33 ResourceResponse* resp, 28 ResourceResponse* resp,
34 bool* defer) { 29 bool* defer) {
35 return true; 30 return true;
36 } 31 }
37 32
38 bool StreamResourceHandler::OnResponseStarted(ResourceResponse* resp, 33 bool StreamResourceHandler::OnResponseStarted(ResourceResponse* resp,
39 bool* defer) { 34 bool* defer) {
40 return true; 35 return true;
(...skipping 24 matching lines...) Expand all
65 const std::string& sec_info, 60 const std::string& sec_info,
66 bool* defer) { 61 bool* defer) {
67 writer_.Finalize(); 62 writer_.Finalize();
68 } 63 }
69 64
70 void StreamResourceHandler::OnDataDownloaded(int bytes_downloaded) { 65 void StreamResourceHandler::OnDataDownloaded(int bytes_downloaded) {
71 NOTREACHED(); 66 NOTREACHED();
72 } 67 }
73 68
74 } // namespace content 69 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/stream_resource_handler.h ('k') | content/browser/loader/sync_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698