OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/plugin_updater.h" | 5 #include "chrome/browser/plugin_updater.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 if ((!enable_internal_pdf_ && !found_internal_pdf) && | 212 if ((!enable_internal_pdf_ && !found_internal_pdf) && |
213 !force_internal_pdf_for_this_run) { | 213 !force_internal_pdf_for_this_run) { |
214 // The internal PDF plugin is disabled by default, and the user hasn't | 214 // The internal PDF plugin is disabled by default, and the user hasn't |
215 // overridden the default. | 215 // overridden the default. |
216 NPAPI::PluginList::Singleton()->DisablePlugin(pdf_path); | 216 NPAPI::PluginList::Singleton()->DisablePlugin(pdf_path); |
217 EnablePluginGroup(false, pdf_group_name); | 217 EnablePluginGroup(false, pdf_group_name); |
218 } | 218 } |
219 | 219 |
220 if (force_enable_internal_pdf) { | 220 if (force_enable_internal_pdf) { |
221 // See http://crbug.com/50105 for background. | 221 // See http://crbug.com/50105 for background. |
222 EnablePluginGroup(false, ASCIIToUTF16(PluginGroup::kAdobeReader8GroupName)); | 222 EnablePluginGroup(false, ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName)); |
223 EnablePluginGroup(false, ASCIIToUTF16(PluginGroup::kAdobeReader9GroupName)); | |
224 | 223 |
225 // We want to save this, but doing so requires loading the list of plugins, | 224 // We want to save this, but doing so requires loading the list of plugins, |
226 // so do it after a minute as to not impact startup performance. Note that | 225 // so do it after a minute as to not impact startup performance. Note that |
227 // plugins are loaded after 30s by the metrics service. | 226 // plugins are loaded after 30s by the metrics service. |
228 UpdatePreferences(profile, kPluginUpdateDelayMs); | 227 UpdatePreferences(profile, kPluginUpdateDelayMs); |
229 } | 228 } |
230 } | 229 } |
231 | 230 |
232 void PluginUpdater::UpdatePreferences(Profile* profile, int delay_ms) { | 231 void PluginUpdater::UpdatePreferences(Profile* profile, int delay_ms) { |
233 BrowserThread::PostDelayedTask( | 232 BrowserThread::PostDelayedTask( |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 NotificationService::current()->Notify( | 296 NotificationService::current()->Notify( |
298 NotificationType::PLUGIN_ENABLE_STATUS_CHANGED, | 297 NotificationType::PLUGIN_ENABLE_STATUS_CHANGED, |
299 Source<PluginUpdater>(GetPluginUpdater()), | 298 Source<PluginUpdater>(GetPluginUpdater()), |
300 NotificationService::NoDetails()); | 299 NotificationService::NoDetails()); |
301 } | 300 } |
302 | 301 |
303 /*static*/ | 302 /*static*/ |
304 PluginUpdater* PluginUpdater::GetPluginUpdater() { | 303 PluginUpdater* PluginUpdater::GetPluginUpdater() { |
305 return Singleton<PluginUpdater>::get(); | 304 return Singleton<PluginUpdater>::get(); |
306 } | 305 } |
OLD | NEW |