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

Side by Side Diff: content/browser/download/download_resource_handler.h

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
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.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 (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_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 27 matching lines...) Expand all
38 static const int kDownloadByteStreamSize; 38 static const int kDownloadByteStreamSize;
39 39
40 // started_cb will be called exactly once on the UI thread. 40 // started_cb will be called exactly once on the UI thread.
41 // |id| should be invalid if the id should be automatically assigned. 41 // |id| should be invalid if the id should be automatically assigned.
42 DownloadResourceHandler( 42 DownloadResourceHandler(
43 uint32 id, 43 uint32 id,
44 net::URLRequest* request, 44 net::URLRequest* request,
45 const DownloadUrlParameters::OnStartedCallback& started_cb, 45 const DownloadUrlParameters::OnStartedCallback& started_cb,
46 scoped_ptr<DownloadSaveInfo> save_info); 46 scoped_ptr<DownloadSaveInfo> save_info);
47 47
48 bool OnUploadProgress(uint64 position, uint64 size) override;
49
50 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, 48 bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
51 ResourceResponse* response, 49 ResourceResponse* response,
52 bool* defer) override; 50 bool* defer) override;
53 51
54 // Send the download creation information to the download thread. 52 // Send the download creation information to the download thread.
55 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; 53 bool OnResponseStarted(ResourceResponse* response, bool* defer) override;
56 54
57 // Pass-through implementation. 55 // Pass-through implementation.
58 bool OnWillStart(const GURL& url, bool* defer) override; 56 bool OnWillStart(const GURL& url, bool* defer) override;
59 57
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 129
132 static const int kReadBufSize = 32768; // bytes 130 static const int kReadBufSize = 32768; // bytes
133 static const int kThrottleTimeMs = 200; // milliseconds 131 static const int kThrottleTimeMs = 200; // milliseconds
134 132
135 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); 133 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler);
136 }; 134 };
137 135
138 } // namespace content 136 } // namespace content
139 137
140 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ 138 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698