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

Side by Side Diff: content/browser/loader/stream_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
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 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/browser/loader/resource_handler.h" 10 #include "content/browser/loader/resource_handler.h"
(...skipping 13 matching lines...) Expand all
24 // |origin| will be used to construct the URL for the Stream. See 24 // |origin| will be used to construct the URL for the Stream. See
25 // WebCore::BlobURL and and WebCore::SecurityOrigin in Blink to understand 25 // WebCore::BlobURL and and WebCore::SecurityOrigin in Blink to understand
26 // how origin check is done on resource loading. 26 // how origin check is done on resource loading.
27 StreamResourceHandler(net::URLRequest* request, 27 StreamResourceHandler(net::URLRequest* request,
28 StreamRegistry* registry, 28 StreamRegistry* registry,
29 const GURL& origin); 29 const GURL& origin);
30 ~StreamResourceHandler() override; 30 ~StreamResourceHandler() override;
31 31
32 void SetController(ResourceController* controller) override; 32 void SetController(ResourceController* controller) override;
33 33
34 bool OnUploadProgress(uint64 position, uint64 size) override;
35
36 // Not needed, as this event handler ought to be the final resource. 34 // Not needed, as this event handler ought to be the final resource.
37 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, 35 bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
38 ResourceResponse* resp, 36 ResourceResponse* resp,
39 bool* defer) override; 37 bool* defer) override;
40 38
41 bool OnResponseStarted(ResourceResponse* resp, bool* defer) override; 39 bool OnResponseStarted(ResourceResponse* resp, bool* defer) override;
42 40
43 bool OnWillStart(const GURL& url, bool* defer) override; 41 bool OnWillStart(const GURL& url, bool* defer) override;
44 42
45 bool OnBeforeNetworkStart(const GURL& url, bool* defer) override; 43 bool OnBeforeNetworkStart(const GURL& url, bool* defer) override;
(...skipping 16 matching lines...) Expand all
62 60
63 private: 61 private:
64 StreamWriter writer_; 62 StreamWriter writer_;
65 63
66 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler); 64 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler);
67 }; 65 };
68 66
69 } // namespace content 67 } // namespace content
70 68
71 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ 69 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_loader_unittest.cc ('k') | content/browser/loader/stream_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698