| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_PREFERENCES_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_PREFERENCES_H_ |
| 6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_PREFERENCES_H_ | 6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_PREFERENCES_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 scoped_refptr<ChromeSpeechRecognitionPreferences> GetForProfile( | 62 scoped_refptr<ChromeSpeechRecognitionPreferences> GetForProfile( |
| 63 Profile* profile); | 63 Profile* profile); |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 friend struct DefaultSingletonTraits<Factory>; | 66 friend struct DefaultSingletonTraits<Factory>; |
| 67 | 67 |
| 68 Factory(); | 68 Factory(); |
| 69 virtual ~Factory(); | 69 virtual ~Factory(); |
| 70 | 70 |
| 71 // ProfileKeyedServiceFactory methods: | 71 // ProfileKeyedServiceFactory methods: |
| 72 virtual ProfileKeyedService* BuildServiceInstanceFor(Profile* profile) | 72 virtual ProfileKeyedService* BuildServiceInstanceFor( |
| 73 const OVERRIDE; | 73 content::BrowserContext* profile) const OVERRIDE; |
| 74 virtual void RegisterUserPrefs(PrefRegistrySyncable* registry) OVERRIDE; | 74 virtual void RegisterUserPrefs(PrefRegistrySyncable* registry) OVERRIDE; |
| 75 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; | 75 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; |
| 76 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 76 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |
| 77 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE; | 77 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(Factory); | 79 DISALLOW_COPY_AND_ASSIGN(Factory); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 // This wrapper handles the binding between ChromeSpeechRecognitionPreferences | 82 // This wrapper handles the binding between ChromeSpeechRecognitionPreferences |
| 83 // instances (which can have a longer lifetime, since they are refcounted) and | 83 // instances (which can have a longer lifetime, since they are refcounted) and |
| (...skipping 30 matching lines...) Expand all Loading... |
| 114 scoped_ptr<base::ListValue> notifications_shown_; | 114 scoped_ptr<base::ListValue> notifications_shown_; |
| 115 | 115 |
| 116 // Lock used to ensure exclusive access to preference variables that are | 116 // Lock used to ensure exclusive access to preference variables that are |
| 117 // accessed by both threads (note: mutable is required to keep getters const). | 117 // accessed by both threads (note: mutable is required to keep getters const). |
| 118 mutable base::Lock preferences_lock_; | 118 mutable base::Lock preferences_lock_; |
| 119 | 119 |
| 120 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionPreferences); | 120 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionPreferences); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_PREFERENCES_H_ | 123 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_PREFERENCES_H_ |
| OLD | NEW |