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

Side by Side Diff: chrome/browser/plugins/plugin_finder.h

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years 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 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/singleton.h" 15 #include "base/memory/singleton.h"
16 #include "base/string16.h" 16 #include "base/string16.h"
17 #include "webkit/plugins/webplugininfo.h" 17 #include "webkit/plugins/webplugininfo.h"
18 18
19 namespace base { 19 namespace base {
20 class DictionaryValue; 20 class DictionaryValue;
21 } 21 }
22 22
23 class GURL; 23 class GURL;
24 class PluginMetadata; 24 class PluginMetadata;
25 class PrefService; 25 class PrefServiceSimple;
26 26
27 #if defined(ENABLE_PLUGIN_INSTALLATION) 27 #if defined(ENABLE_PLUGIN_INSTALLATION)
28 class PluginInstaller; 28 class PluginInstaller;
29 #endif 29 #endif
30 30
31 // This class should be created and initialized by calling 31 // This class should be created and initialized by calling
32 // |GetInstance()| and |Init()| on the UI thread. 32 // |GetInstance()| and |Init()| on the UI thread.
33 // After that it can be safely used on any other thread. 33 // After that it can be safely used on any other thread.
34 class PluginFinder { 34 class PluginFinder {
35 public: 35 public:
36 static void RegisterPrefs(PrefService* local_state); 36 static void RegisterPrefs(PrefServiceSimple* local_state);
37 37
38 static PluginFinder* GetInstance(); 38 static PluginFinder* GetInstance();
39 39
40 // It should be called on the UI thread. 40 // It should be called on the UI thread.
41 void Init(); 41 void Init();
42 42
43 #if defined(ENABLE_PLUGIN_INSTALLATION) 43 #if defined(ENABLE_PLUGIN_INSTALLATION)
44 void ReinitializePlugins(const base::DictionaryValue& json_metadata); 44 void ReinitializePlugins(const base::DictionaryValue& json_metadata);
45 45
46 // Finds a plug-in for the given MIME type and language (specified as an IETF 46 // Finds a plug-in for the given MIME type and language (specified as an IETF
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 std::map<std::string, PluginMetadata*> identifier_plugin_; 92 std::map<std::string, PluginMetadata*> identifier_plugin_;
93 93
94 // Synchronization for the above member variables is 94 // Synchronization for the above member variables is
95 // required since multiple threads can be accessing them concurrently. 95 // required since multiple threads can be accessing them concurrently.
96 base::Lock mutex_; 96 base::Lock mutex_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(PluginFinder); 98 DISALLOW_COPY_AND_ASSIGN(PluginFinder);
99 }; 99 };
100 100
101 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ 101 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698