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

Side by Side Diff: chrome/browser/options_page_base.cc

Issue 3203008: Move prefs-related files under chrome/browser/ into a prefs/ subdir. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/options_page_base.h" 5 #include "chrome/browser/options_page_base.h"
6 6
7 #include "chrome/browser/metrics/user_metrics.h" 7 #include "chrome/browser/metrics/user_metrics.h"
8 #include "chrome/browser/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/common/notification_service.h" 9 #include "chrome/common/notification_service.h"
10 10
11 /////////////////////////////////////////////////////////////////////////////// 11 ///////////////////////////////////////////////////////////////////////////////
12 // OptionsPageBase 12 // OptionsPageBase
13 13
14 OptionsPageBase::OptionsPageBase(Profile* profile) 14 OptionsPageBase::OptionsPageBase(Profile* profile)
15 : profile_(profile) { 15 : profile_(profile) {
16 } 16 }
17 17
18 OptionsPageBase::~OptionsPageBase() { 18 OptionsPageBase::~OptionsPageBase() {
19 } 19 }
20 20
21 void OptionsPageBase::UserMetricsRecordAction(const UserMetricsAction& action, 21 void OptionsPageBase::UserMetricsRecordAction(const UserMetricsAction& action,
22 PrefService* prefs) { 22 PrefService* prefs) {
23 UserMetrics::RecordAction(action, profile()); 23 UserMetrics::RecordAction(action, profile());
24 if (prefs) 24 if (prefs)
25 prefs->ScheduleSavePersistentPrefs(); 25 prefs->ScheduleSavePersistentPrefs();
26 } 26 }
27 27
28 /////////////////////////////////////////////////////////////////////////////// 28 ///////////////////////////////////////////////////////////////////////////////
29 // OptionsPageBase, NotificationObserver implementation: 29 // OptionsPageBase, NotificationObserver implementation:
30 30
31 void OptionsPageBase::Observe(NotificationType type, 31 void OptionsPageBase::Observe(NotificationType type,
32 const NotificationSource& source, 32 const NotificationSource& source,
33 const NotificationDetails& details) { 33 const NotificationDetails& details) {
34 if (type == NotificationType::PREF_CHANGED) 34 if (type == NotificationType::PREF_CHANGED)
35 NotifyPrefChanged(Details<std::string>(details).ptr()); 35 NotifyPrefChanged(Details<std::string>(details).ptr());
36 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698