OLD | NEW |
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/eula_accepted_notifier.h" | 5 #include "components/web_resource/eula_accepted_notifier.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/prefs/pref_service.h" | |
10 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "components/prefs/pref_service.h" |
11 #include "components/web_resource/web_resource_pref_names.h" | 11 #include "components/web_resource/web_resource_pref_names.h" |
12 | 12 |
13 namespace web_resource { | 13 namespace web_resource { |
14 | 14 |
15 EulaAcceptedNotifier::EulaAcceptedNotifier(PrefService* local_state) | 15 EulaAcceptedNotifier::EulaAcceptedNotifier(PrefService* local_state) |
16 : local_state_(local_state), observer_(nullptr) { | 16 : local_state_(local_state), observer_(nullptr) { |
17 } | 17 } |
18 | 18 |
19 EulaAcceptedNotifier::~EulaAcceptedNotifier() { | 19 EulaAcceptedNotifier::~EulaAcceptedNotifier() { |
20 } | 20 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 void EulaAcceptedNotifier::OnPrefChanged() { | 62 void EulaAcceptedNotifier::OnPrefChanged() { |
63 DCHECK(!registrar_.IsEmpty()); | 63 DCHECK(!registrar_.IsEmpty()); |
64 registrar_.RemoveAll(); | 64 registrar_.RemoveAll(); |
65 | 65 |
66 DCHECK(local_state_->GetBoolean(prefs::kEulaAccepted)); | 66 DCHECK(local_state_->GetBoolean(prefs::kEulaAccepted)); |
67 observer_->OnEulaAccepted(); | 67 observer_->OnEulaAccepted(); |
68 } | 68 } |
69 | 69 |
70 } // namespace web_resource | 70 } // namespace web_resource |
OLD | NEW |