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

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

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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
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
OLDNEW
« no previous file with comments | « components/web_resource/eula_accepted_notifier.h ('k') | components/web_resource/eula_accepted_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698