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