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

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

Issue 3052015: Disabled internal PDF by default.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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 | « no previous file | no next file » | 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) 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 void EnablePluginFile(bool enable, const FilePath::StringType& path) { 83 void EnablePluginFile(bool enable, const FilePath::StringType& path) {
84 FilePath file_path(path); 84 FilePath file_path(path);
85 if (enable && !PluginGroup::IsPluginPathDisabledByPolicy(file_path)) 85 if (enable && !PluginGroup::IsPluginPathDisabledByPolicy(file_path))
86 NPAPI::PluginList::Singleton()->EnablePlugin(file_path); 86 NPAPI::PluginList::Singleton()->EnablePlugin(file_path);
87 else 87 else
88 NPAPI::PluginList::Singleton()->DisablePlugin(file_path); 88 NPAPI::PluginList::Singleton()->DisablePlugin(file_path);
89 } 89 }
90 90
91 static bool enable_internal_pdf_ = true; 91 static bool enable_internal_pdf_ = false;
92 92
93 void DisablePluginGroupsFromPrefs(Profile* profile) { 93 void DisablePluginGroupsFromPrefs(Profile* profile) {
94 bool update_internal_dir = false; 94 bool update_internal_dir = false;
95 FilePath last_internal_dir = 95 FilePath last_internal_dir =
96 profile->GetPrefs()->GetFilePath(prefs::kPluginsLastInternalDirectory); 96 profile->GetPrefs()->GetFilePath(prefs::kPluginsLastInternalDirectory);
97 FilePath cur_internal_dir; 97 FilePath cur_internal_dir;
98 if (PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &cur_internal_dir) && 98 if (PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &cur_internal_dir) &&
99 cur_internal_dir != last_internal_dir) { 99 cur_internal_dir != last_internal_dir) {
100 update_internal_dir = true; 100 update_internal_dir = true;
101 profile->GetPrefs()->SetFilePath( 101 profile->GetPrefs()->SetFilePath(
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 it != plugin_groups.end(); 233 it != plugin_groups.end();
234 ++it) { 234 ++it) {
235 // Don't save preferences for vulnerable pugins. 235 // Don't save preferences for vulnerable pugins.
236 if (!(*it)->IsVulnerable()) { 236 if (!(*it)->IsVulnerable()) {
237 plugins_list->Append((*it)->GetSummary()); 237 plugins_list->Append((*it)->GetSummary());
238 } 238 }
239 } 239 }
240 } 240 }
241 241
242 } // namespace plugin_updater 242 } // namespace plugin_updater
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698