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

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

Issue 3028009: Enable the pdf plugin 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 #if defined(OS_CHROMEOS)
92 static bool enable_internal_pdf_ = true; 91 static bool enable_internal_pdf_ = true;
93 #else
94 static bool enable_internal_pdf_ = false;
95 #endif
96 92
97 void DisablePluginGroupsFromPrefs(Profile* profile) { 93 void DisablePluginGroupsFromPrefs(Profile* profile) {
98 bool update_internal_dir = false; 94 bool update_internal_dir = false;
99 FilePath last_internal_dir = 95 FilePath last_internal_dir =
100 profile->GetPrefs()->GetFilePath(prefs::kPluginsLastInternalDirectory); 96 profile->GetPrefs()->GetFilePath(prefs::kPluginsLastInternalDirectory);
101 FilePath cur_internal_dir; 97 FilePath cur_internal_dir;
102 if (PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &cur_internal_dir) && 98 if (PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &cur_internal_dir) &&
103 cur_internal_dir != last_internal_dir) { 99 cur_internal_dir != last_internal_dir) {
104 update_internal_dir = true; 100 update_internal_dir = true;
105 profile->GetPrefs()->SetFilePath( 101 profile->GetPrefs()->SetFilePath(
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 it != plugin_groups.end(); 233 it != plugin_groups.end();
238 ++it) { 234 ++it) {
239 // Don't save preferences for vulnerable pugins. 235 // Don't save preferences for vulnerable pugins.
240 if (!(*it)->IsVulnerable()) { 236 if (!(*it)->IsVulnerable()) {
241 plugins_list->Append((*it)->GetSummary()); 237 plugins_list->Append((*it)->GetSummary());
242 } 238 }
243 } 239 }
244 } 240 }
245 241
246 } // 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