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

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

Issue 289063012: [Hotword] Add error message display back in. Add error messages for NaCl. Add metrics for errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove audio Created 6 years, 7 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 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 // Returns true to show the opt in pop up for |context|. 22 // Returns true to show the opt in pop up for |context|.
23 static bool ShouldShowOptInPopup(content::BrowserContext* context); 23 static bool ShouldShowOptInPopup(content::BrowserContext* context);
24 24
25 // Returns true if the hotwording service is available for |context|. 25 // Returns true if the hotwording service is available for |context|.
26 static bool IsServiceAvailable(content::BrowserContext* context); 26 static bool IsServiceAvailable(content::BrowserContext* context);
27 27
28 // Returns true if hotwording is allowed for |context|. 28 // Returns true if hotwording is allowed for |context|.
29 static bool IsHotwordAllowed(content::BrowserContext* context); 29 static bool IsHotwordAllowed(content::BrowserContext* context);
30 30
31 // Passes control to the individual service to deal with reloading the 31 // Returns the current error message for the service for |context|.
32 // hotword extension as necessary. 32 // A value of 0 indicates no error.
33 static bool RetryHotwordExtension(Profile* profile); 33 static int GetCurrentError(content::BrowserContext* context);
34 34
35 private: 35 private:
36 friend struct DefaultSingletonTraits<HotwordServiceFactory>; 36 friend struct DefaultSingletonTraits<HotwordServiceFactory>;
37 37
38 HotwordServiceFactory(); 38 HotwordServiceFactory();
39 virtual ~HotwordServiceFactory(); 39 virtual ~HotwordServiceFactory();
40 40
41 // Overrides from BrowserContextKeyedServiceFactory: 41 // Overrides from BrowserContextKeyedServiceFactory:
42 virtual void RegisterProfilePrefs( 42 virtual void RegisterProfilePrefs(
43 user_prefs::PrefRegistrySyncable* registry) OVERRIDE; 43 user_prefs::PrefRegistrySyncable* registry) OVERRIDE;
44 virtual KeyedService* BuildServiceInstanceFor( 44 virtual KeyedService* BuildServiceInstanceFor(
45 content::BrowserContext* context) const OVERRIDE; 45 content::BrowserContext* context) const OVERRIDE;
46 46
47 DISALLOW_COPY_AND_ASSIGN(HotwordServiceFactory); 47 DISALLOW_COPY_AND_ASSIGN(HotwordServiceFactory);
48 }; 48 };
49 49
50 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_ 50 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698