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

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

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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
« no previous file with comments | « chrome/browser/plugins/plugin_finder.h ('k') | chrome/browser/policy/auto_enrollment_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/plugins/plugin_finder.h" 5 #include "chrome/browser/plugins/plugin_finder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "base/sys_string_conversions.h" 11 #include "base/sys_string_conversions.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/plugins/plugin_metadata.h" 15 #include "chrome/browser/plugins/plugin_metadata.h"
16 #include "chrome/browser/prefs/pref_registry_simple.h"
16 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
18 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
19 #include "content/public/browser/plugin_service.h" 20 #include "content/public/browser/plugin_service.h"
20 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
21 #include "grit/browser_resources.h" 22 #include "grit/browser_resources.h"
22 #include "ui/base/resource/resource_bundle.h" 23 #include "ui/base/resource/resource_bundle.h"
23 24
24 #if defined(ENABLE_PLUGIN_INSTALLATION) 25 #if defined(ENABLE_PLUGIN_INSTALLATION)
25 #include "chrome/browser/plugins/plugin_installer.h" 26 #include "chrome/browser/plugins/plugin_installer.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 129 }
129 130
130 LoadMimeTypes(false, plugin_dict, plugin); 131 LoadMimeTypes(false, plugin_dict, plugin);
131 LoadMimeTypes(true, plugin_dict, plugin); 132 LoadMimeTypes(true, plugin_dict, plugin);
132 return plugin; 133 return plugin;
133 } 134 }
134 135
135 } // namespace 136 } // namespace
136 137
137 // static 138 // static
138 void PluginFinder::RegisterPrefs(PrefServiceSimple* local_state) { 139 void PluginFinder::RegisterPrefs(PrefRegistrySimple* registry) {
139 local_state->RegisterBooleanPref(prefs::kDisablePluginFinder, false); 140 registry->RegisterBooleanPref(prefs::kDisablePluginFinder, false);
140 } 141 }
141 142
142 // static 143 // static
143 PluginFinder* PluginFinder::GetInstance() { 144 PluginFinder* PluginFinder::GetInstance() {
144 // PluginFinder::GetInstance() is the only method that's allowed to call 145 // PluginFinder::GetInstance() is the only method that's allowed to call
145 // Singleton<PluginFinder>::get(). 146 // Singleton<PluginFinder>::get().
146 return Singleton<PluginFinder>::get(); 147 return Singleton<PluginFinder>::get();
147 } 148 }
148 149
149 PluginFinder::PluginFinder() { 150 PluginFinder::PluginFinder() {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 DCHECK(!identifier_plugin_[identifier]); 312 DCHECK(!identifier_plugin_[identifier]);
312 identifier_plugin_[identifier] = CreatePluginMetadata(identifier, plugin); 313 identifier_plugin_[identifier] = CreatePluginMetadata(identifier, plugin);
313 314
314 #if defined(ENABLE_PLUGIN_INSTALLATION) 315 #if defined(ENABLE_PLUGIN_INSTALLATION)
315 if (installers_.find(identifier) == installers_.end()) 316 if (installers_.find(identifier) == installers_.end())
316 installers_[identifier] = new PluginInstaller(); 317 installers_[identifier] = new PluginInstaller();
317 #endif 318 #endif
318 } 319 }
319 } 320 }
320 } 321 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_finder.h ('k') | chrome/browser/policy/auto_enrollment_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698