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

Side by Side Diff: chrome/browser/plugin_prefs.cc

Issue 8493026: Revert r108760 / reland r108744, r108753 w/ fix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename plugin list accessor to plugin_list() Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_prefs.h" 5 #include "chrome/browser/plugin_prefs.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 const std::set<string16>& disabled_exception_patterns, 473 const std::set<string16>& disabled_exception_patterns,
474 const std::set<string16>& enabled_patterns) { 474 const std::set<string16>& enabled_patterns) {
475 policy_disabled_plugin_patterns_ = disabled_patterns; 475 policy_disabled_plugin_patterns_ = disabled_patterns;
476 policy_disabled_plugin_exception_patterns_ = disabled_exception_patterns; 476 policy_disabled_plugin_exception_patterns_ = disabled_exception_patterns;
477 policy_enabled_plugin_patterns_ = enabled_patterns; 477 policy_enabled_plugin_patterns_ = enabled_patterns;
478 } 478 }
479 479
480 webkit::npapi::PluginList* PluginPrefs::GetPluginList() { 480 webkit::npapi::PluginList* PluginPrefs::GetPluginList() {
481 if (plugin_list_) 481 if (plugin_list_)
482 return plugin_list_; 482 return plugin_list_;
483 return webkit::npapi::PluginList::Singleton(); 483 return PluginService::GetInstance()->plugin_list();
484 } 484 }
485 485
486 void PluginPrefs::GetPreferencesDataOnFileThread() { 486 void PluginPrefs::GetPreferencesDataOnFileThread() {
487 std::vector<webkit::npapi::PluginGroup> groups; 487 std::vector<webkit::npapi::PluginGroup> groups;
488 488
489 webkit::npapi::PluginList* plugin_list = GetPluginList(); 489 webkit::npapi::PluginList* plugin_list = GetPluginList();
490 plugin_list->GetPluginGroups(false, &groups); 490 plugin_list->GetPluginGroups(false, &groups);
491 491
492 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 492 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
493 base::Bind(&PluginPrefs::OnUpdatePreferences, this, groups)); 493 base::Bind(&PluginPrefs::OnUpdatePreferences, this, groups));
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 } 540 }
541 } 541 }
542 542
543 void PluginPrefs::NotifyPluginStatusChanged() { 543 void PluginPrefs::NotifyPluginStatusChanged() {
544 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 544 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
545 content::NotificationService::current()->Notify( 545 content::NotificationService::current()->Notify(
546 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 546 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
547 content::Source<Profile>(profile_), 547 content::Source<Profile>(profile_),
548 content::NotificationService::NoDetails()); 548 content::NotificationService::NoDetails());
549 } 549 }
OLDNEW
« no previous file with comments | « chrome/browser/plugin_observer.cc ('k') | chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698