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

Side by Side Diff: chrome/browser/speech/chrome_speech_recognition_preferences.cc

Issue 10855075: Clean-up inline members of nested classes (chrome/) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/speech/chrome_speech_recognition_preferences.h" 5 #include "chrome/browser/speech/chrome_speech_recognition_preferences.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 prefs->RegisterBooleanPref( 61 prefs->RegisterBooleanPref(
62 prefs::kSpeechRecognitionFilterProfanities, 62 prefs::kSpeechRecognitionFilterProfanities,
63 kDefaultFilterProfanities, 63 kDefaultFilterProfanities,
64 PrefService::UNSYNCABLE_PREF); 64 PrefService::UNSYNCABLE_PREF);
65 65
66 prefs->RegisterListPref( 66 prefs->RegisterListPref(
67 prefs::kSpeechRecognitionTrayNotificationShownContexts, 67 prefs::kSpeechRecognitionTrayNotificationShownContexts,
68 PrefService::UNSYNCABLE_PREF); 68 PrefService::UNSYNCABLE_PREF);
69 } 69 }
70 70
71 bool
72 ChromeSpeechRecognitionPreferences::Factory::ServiceRedirectedInIncognito() {
73 return false;
74 }
75
76 bool ChromeSpeechRecognitionPreferences::Factory::ServiceIsNULLWhileTesting() {
77 return true;
78 }
79
80 bool
81 ChromeSpeechRecognitionPreferences::Factory::ServiceIsCreatedWithProfile() {
82 return false;
83 }
84
71 ChromeSpeechRecognitionPreferences::Service::Service( 85 ChromeSpeechRecognitionPreferences::Service::Service(
72 Profile* profile) 86 Profile* profile)
73 : preferences_(new ChromeSpeechRecognitionPreferences(profile)) { 87 : preferences_(new ChromeSpeechRecognitionPreferences(profile)) {
74 } 88 }
75 89
76 ChromeSpeechRecognitionPreferences::Service::~Service() { 90 ChromeSpeechRecognitionPreferences::Service::~Service() {
77 } 91 }
78 92
79 void ChromeSpeechRecognitionPreferences::Service::Shutdown() { 93 void ChromeSpeechRecognitionPreferences::Service::Shutdown() {
80 DCHECK(preferences_); 94 DCHECK(preferences_);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 if (key == prefs::kSpeechRecognitionFilterProfanities) { 204 if (key == prefs::kSpeechRecognitionFilterProfanities) {
191 filter_profanities_ = 205 filter_profanities_ =
192 pref_service->GetBoolean(prefs::kSpeechRecognitionFilterProfanities); 206 pref_service->GetBoolean(prefs::kSpeechRecognitionFilterProfanities);
193 } else if (key == prefs::kSpeechRecognitionTrayNotificationShownContexts) { 207 } else if (key == prefs::kSpeechRecognitionTrayNotificationShownContexts) {
194 const base::ListValue* pref_list = profile_->GetPrefs()->GetList( 208 const base::ListValue* pref_list = profile_->GetPrefs()->GetList(
195 prefs::kSpeechRecognitionTrayNotificationShownContexts); 209 prefs::kSpeechRecognitionTrayNotificationShownContexts);
196 DCHECK(pref_list); 210 DCHECK(pref_list);
197 notifications_shown_.reset(pref_list->DeepCopy()); 211 notifications_shown_.reset(pref_list->DeepCopy());
198 } 212 }
199 } 213 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/chrome_speech_recognition_preferences.h ('k') | chrome/browser/task_manager/task_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698