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

Side by Side Diff: content/browser/loader/navigation_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_NAVIGATION_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/loader/resource_handler.h" 9 #include "content/browser/loader/resource_handler.h"
10 #include "content/browser/loader/stream_writer.h" 10 #include "content/browser/loader/stream_writer.h"
(...skipping 10 matching lines...) Expand all
21 ~NavigationResourceHandler() override; 21 ~NavigationResourceHandler() override;
22 22
23 // Called by the loader the cancel the request. 23 // Called by the loader the cancel the request.
24 void Cancel(); 24 void Cancel();
25 25
26 // Called to the loader to resume a paused redirect. 26 // Called to the loader to resume a paused redirect.
27 void FollowRedirect(); 27 void FollowRedirect();
28 28
29 // ResourceHandler implementation. 29 // ResourceHandler implementation.
30 void SetController(ResourceController* controller) override; 30 void SetController(ResourceController* controller) override;
31 bool OnUploadProgress(uint64 position, uint64 size) override;
32 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, 31 bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
33 ResourceResponse* response, 32 ResourceResponse* response,
34 bool* defer) override; 33 bool* defer) override;
35 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; 34 bool OnResponseStarted(ResourceResponse* response, bool* defer) override;
36 bool OnWillStart(const GURL& url, bool* defer) override; 35 bool OnWillStart(const GURL& url, bool* defer) override;
37 bool OnBeforeNetworkStart(const GURL& url, bool* defer) override; 36 bool OnBeforeNetworkStart(const GURL& url, bool* defer) override;
38 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, 37 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf,
39 int* buf_size, 38 int* buf_size,
40 int min_size) override; 39 int min_size) override;
41 bool OnReadCompleted(int bytes_read, bool* defer) override; 40 bool OnReadCompleted(int bytes_read, bool* defer) override;
42 void OnResponseCompleted(const net::URLRequestStatus& status, 41 void OnResponseCompleted(const net::URLRequestStatus& status,
43 const std::string& security_info, 42 const std::string& security_info,
44 bool* defer) override; 43 bool* defer) override;
45 void OnDataDownloaded(int bytes_downloaded) override; 44 void OnDataDownloaded(int bytes_downloaded) override;
46 45
47 private: 46 private:
48 // Clears |core_| and its reference to the resource handler. After calling 47 // Clears |core_| and its reference to the resource handler. After calling
49 // this, the lifetime of the request is no longer tied to |core_|. 48 // this, the lifetime of the request is no longer tied to |core_|.
50 void DetachFromCore(); 49 void DetachFromCore();
51 50
52 NavigationURLLoaderImplCore* core_; 51 NavigationURLLoaderImplCore* core_;
53 StreamWriter writer_; 52 StreamWriter writer_;
54 53
55 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler); 54 DISALLOW_COPY_AND_ASSIGN(NavigationResourceHandler);
56 }; 55 };
57 56
58 } // namespace content 57 } // namespace content
59 58
60 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_ 59 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/mime_type_resource_handler_unittest.cc ('k') | content/browser/loader/navigation_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698