blob: da79bb5843eda1dde871c4468fa137212b7953fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/loader/null_resource_controller.h"
#include "base/logging.h"
namespace content {
NullResourceController::NullResourceController(bool* was_resumed)
: was_resumed_(was_resumed) {
*was_resumed = false;
}
NullResourceController::~NullResourceController() {}
void NullResourceController::Cancel() {
DCHECK(!*was_resumed_);
}
void NullResourceController::CancelWithError(int error_code) {
DCHECK(!*was_resumed_);
}
void NullResourceController::Resume() {
*was_resumed_ = true;
}
} // namespace content
|