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

Side by Side Diff: chrome/browser/search/hotword_service.h

Issue 647083003: Reinstall the hotword shared module on a lanuage change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split common extension condition into function. Created 6 years, 2 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 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_
6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ 6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 enum LaunchMode { 119 enum LaunchMode {
120 AUDIO_HISTORY_ONLY, 120 AUDIO_HISTORY_ONLY,
121 HOTWORD_ONLY, 121 HOTWORD_ONLY,
122 HOTWORD_AND_AUDIO_HISTORY, 122 HOTWORD_AND_AUDIO_HISTORY,
123 SPEECH_TRAINING 123 SPEECH_TRAINING
124 }; 124 };
125 void LaunchHotwordAudioVerificationApp(const LaunchMode& launch_mode); 125 void LaunchHotwordAudioVerificationApp(const LaunchMode& launch_mode);
126 virtual LaunchMode GetHotwordAudioVerificationLaunchMode(); 126 virtual LaunchMode GetHotwordAudioVerificationLaunchMode();
127 127
128 private: 128 private:
129 // Returns the ID of the extension that may need to be reinstalled.
130 std::string ReinstalledExtensionId();
131
129 Profile* profile_; 132 Profile* profile_;
130 133
131 PrefChangeRegistrar pref_registrar_; 134 PrefChangeRegistrar pref_registrar_;
132 135
133 content::NotificationRegistrar registrar_; 136 content::NotificationRegistrar registrar_;
134 137
135 // For observing the ExtensionRegistry. 138 // For observing the ExtensionRegistry.
136 ScopedObserver<extensions::ExtensionRegistry, 139 ScopedObserver<extensions::ExtensionRegistry,
137 extensions::ExtensionRegistryObserver> 140 extensions::ExtensionRegistryObserver>
138 extension_registry_observer_; 141 extension_registry_observer_;
139 142
140 scoped_refptr<extensions::WebstoreStandaloneInstaller> installer_; 143 scoped_refptr<extensions::WebstoreStandaloneInstaller> installer_;
141 144
142 HotwordClient* client_; 145 HotwordClient* client_;
143 int error_message_; 146 int error_message_;
144 bool reinstall_pending_; 147 bool reinstall_pending_;
145 148
146 base::WeakPtrFactory<HotwordService> weak_factory_; 149 base::WeakPtrFactory<HotwordService> weak_factory_;
147 150
148 // Stores the launch mode for the Hotword Audio Verification App. 151 // Stores the launch mode for the Hotword Audio Verification App.
149 LaunchMode hotword_audio_verification_launch_mode_; 152 LaunchMode hotword_audio_verification_launch_mode_;
150 153
151 DISALLOW_COPY_AND_ASSIGN(HotwordService); 154 DISALLOW_COPY_AND_ASSIGN(HotwordService);
152 }; 155 };
153 156
154 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ 157 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_test_base.h ('k') | chrome/browser/search/hotword_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698