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

Side by Side Diff: components/web_resource/resource_request_allowed_notifier_test_util.cc

Issue 1917673002: Convert //components/[u-z]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "components/web_resource/resource_request_allowed_notifier_test_util.h" 5 #include "components/web_resource/resource_request_allowed_notifier_test_util.h"
6 6
7 namespace web_resource { 7 namespace web_resource {
8 8
9 TestRequestAllowedNotifier::TestRequestAllowedNotifier(PrefService* local_state) 9 TestRequestAllowedNotifier::TestRequestAllowedNotifier(PrefService* local_state)
10 : ResourceRequestAllowedNotifier(local_state, nullptr), 10 : ResourceRequestAllowedNotifier(local_state, nullptr),
11 override_requests_allowed_(false), 11 override_requests_allowed_(false),
12 requests_allowed_(true) { 12 requests_allowed_(true) {
13 } 13 }
14 14
15 TestRequestAllowedNotifier::~TestRequestAllowedNotifier() { 15 TestRequestAllowedNotifier::~TestRequestAllowedNotifier() {
16 } 16 }
17 17
18 void TestRequestAllowedNotifier::InitWithEulaAcceptNotifier( 18 void TestRequestAllowedNotifier::InitWithEulaAcceptNotifier(
19 Observer* observer, 19 Observer* observer,
20 scoped_ptr<EulaAcceptedNotifier> eula_notifier) { 20 std::unique_ptr<EulaAcceptedNotifier> eula_notifier) {
21 test_eula_notifier_.swap(eula_notifier); 21 test_eula_notifier_.swap(eula_notifier);
22 Init(observer); 22 Init(observer);
23 } 23 }
24 24
25 void TestRequestAllowedNotifier::SetRequestsAllowedOverride(bool allowed) { 25 void TestRequestAllowedNotifier::SetRequestsAllowedOverride(bool allowed) {
26 override_requests_allowed_ = true; 26 override_requests_allowed_ = true;
27 requests_allowed_ = allowed; 27 requests_allowed_ = allowed;
28 } 28 }
29 29
30 void TestRequestAllowedNotifier::NotifyObserver() { 30 void TestRequestAllowedNotifier::NotifyObserver() {
(...skipping 11 matching lines...) Expand all
42 if (override_requests_allowed_) 42 if (override_requests_allowed_)
43 return requests_allowed_ ? ALLOWED : DISALLOWED_NETWORK_DOWN; 43 return requests_allowed_ ? ALLOWED : DISALLOWED_NETWORK_DOWN;
44 return ResourceRequestAllowedNotifier::GetResourceRequestsAllowedState(); 44 return ResourceRequestAllowedNotifier::GetResourceRequestsAllowedState();
45 } 45 }
46 46
47 EulaAcceptedNotifier* TestRequestAllowedNotifier::CreateEulaNotifier() { 47 EulaAcceptedNotifier* TestRequestAllowedNotifier::CreateEulaNotifier() {
48 return test_eula_notifier_.release(); 48 return test_eula_notifier_.release();
49 } 49 }
50 50
51 } // namespace web_resource 51 } // namespace web_resource
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698