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

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

Issue 2626663002: Update MimeSniffingResourceHandler tests to use MockResourceLoader. (Closed)
Patch Set: Merge Created 3 years, 11 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_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_CONTROLLER_H_
6 #define CONTENT_BROWSER_LOADER_RESOURCE_CONTROLLER_H_ 6 #define CONTENT_BROWSER_LOADER_RESOURCE_CONTROLLER_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // Used to either resume a deferred resource load or cancel a resource load at 12 // Used to either resume a deferred resource load or cancel a resource load at
13 // any time. CancelAndIgnore is a variation of Cancel that also causes the 13 // any time. CancelAndIgnore is a variation of Cancel that also causes the
14 // requester of the resource to act like the request was never made. By 14 // requester of the resource to act like the request was never made. By
15 // default, load is cancelled with ERR_ABORTED code. CancelWithError can be used 15 // default, load is cancelled with ERR_ABORTED code. CancelWithError can be used
16 // to cancel load with any other error code. 16 // to cancel load with any other error code.
17 class CONTENT_EXPORT ResourceController { 17 class CONTENT_EXPORT ResourceController {
18 public: 18 public:
19 virtual void Cancel() = 0; 19 virtual void Cancel() = 0;
20 virtual void CancelAndIgnore() = 0; 20 virtual void CancelAndIgnore() = 0;
21 virtual void CancelWithError(int error_code) = 0; 21 virtual void CancelWithError(int error_code) = 0;
22
23 // Resumes the request. May only be called if the request was previously
24 // deferred. Guaranteed not to call back into the ResourceHandler, or destroy
25 // it, synchronously.
22 virtual void Resume() = 0; 26 virtual void Resume() = 0;
23 27
24 protected: 28 protected:
25 virtual ~ResourceController() {} 29 virtual ~ResourceController() {}
26 }; 30 };
27 31
28 } // namespace content 32 } // namespace content
29 33
30 #endif // CONTENT_BROWSER_LOADER_RESOURCE_CONTROLLER_H_ 34 #endif // CONTENT_BROWSER_LOADER_RESOURCE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/mock_resource_loader.cc ('k') | content/browser/loader/test_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698