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

Side by Side Diff: chrome/browser/search/hotword_service_factory.cc

Issue 330193005: [Hotword] Uninstall and reinstall the extension upon language change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittest compile errors Created 6 years, 6 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 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 "chrome/browser/search/hotword_service_factory.h" 5 #include "chrome/browser/search/hotword_service_factory.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/search/hotword_service.h" 9 #include "chrome/browser/search/hotword_service.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 user_prefs::PrefRegistrySyncable* prefs) { 96 user_prefs::PrefRegistrySyncable* prefs) {
97 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled, 97 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled,
98 false, 98 false,
99 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 99 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
100 // Although this is default true, users will not send back information to 100 // Although this is default true, users will not send back information to
101 // Google unless they have opted in to Hotwording at which point they must 101 // Google unless they have opted in to Hotwording at which point they must
102 // also confirm that they wish this preference to be true or opt out of it. 102 // also confirm that they wish this preference to be true or opt out of it.
103 prefs->RegisterBooleanPref(prefs::kHotwordAudioLoggingEnabled, 103 prefs->RegisterBooleanPref(prefs::kHotwordAudioLoggingEnabled,
104 true, 104 true,
105 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 105 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
106 prefs->RegisterStringPref(prefs::kHotwordPreviousLanguage,
107 std::string(),
108 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
106 } 109 }
107 110
108 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( 111 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor(
109 BrowserContext* context) const { 112 BrowserContext* context) const {
110 return new HotwordService(Profile::FromBrowserContext(context)); 113 return new HotwordService(Profile::FromBrowserContext(context));
111 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/search/hotword_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698