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

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

Issue 2526983002: Refactor ResourceHandler API. (Closed)
Patch Set: Response to comments Created 3 years, 10 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_LOADER_NULL_RESOURCE_CONTROLLER_H_
6 #define CONTENT_BROWSER_LOADER_NULL_RESOURCE_CONTROLLER_H_
7
8 #include "base/macros.h"
9 #include "content/browser/loader/resource_controller.h"
10
11 namespace content {
12
13 // A pseudo-ResourceController that just tracks whether it was resumed or not.
14 // Only intended when calling into ResourceHandlers that either much resume the
15 // request, or when the consumer doesn't care if the request was resumed or not.
16 // TODO(mmenke): Modify consumers so they don't need to use this class.
17 class NullResourceController : public ResourceController {
18 public:
19 explicit NullResourceController(bool* was_resumed);
20 ~NullResourceController() override;
21
22 // ResourceController implementation:
23 void Cancel() override;
24 void CancelAndIgnore() override;
25 void CancelWithError(int error_code) override;
26 void Resume() override;
27
28 private:
29 bool* was_resumed_;
30
31 DISALLOW_COPY_AND_ASSIGN(NullResourceController);
32 };
33
34 } // namespace content
35
36 #endif // CONTENT_BROWSER_LOADER_NULL_RESOURCE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_resource_handler.cc ('k') | content/browser/loader/null_resource_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698