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

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

Issue 19844003: Remove webkit/plugins/npapi. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove GetDefaultWindowParent Created 7 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
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_metadata.h" 5 #include "chrome/browser/plugins/plugin_metadata.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "webkit/plugins/npapi/plugin_utils.h"
12 #include "webkit/plugins/webplugininfo.h" 11 #include "webkit/plugins/webplugininfo.h"
13 12
14 // static 13 // static
15 const char PluginMetadata::kAdobeReaderGroupName[] = "Adobe Reader"; 14 const char PluginMetadata::kAdobeReaderGroupName[] = "Adobe Reader";
16 const char PluginMetadata::kJavaGroupName[] = "Java(TM)"; 15 const char PluginMetadata::kJavaGroupName[] = "Java(TM)";
17 const char PluginMetadata::kQuickTimeGroupName[] = "QuickTime Player"; 16 const char PluginMetadata::kQuickTimeGroupName[] = "QuickTime Player";
18 const char PluginMetadata::kShockwaveGroupName[] = "Adobe Shockwave Player"; 17 const char PluginMetadata::kShockwaveGroupName[] = "Adobe Shockwave Player";
19 const char PluginMetadata::kRealPlayerGroupName[] = "RealPlayer"; 18 const char PluginMetadata::kRealPlayerGroupName[] = "RealPlayer";
20 const char PluginMetadata::kSilverlightGroupName[] = "Silverlight"; 19 const char PluginMetadata::kSilverlightGroupName[] = "Silverlight";
21 const char PluginMetadata::kWindowsMediaPlayerGroupName[] = 20 const char PluginMetadata::kWindowsMediaPlayerGroupName[] =
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (versions_.empty()) { 95 if (versions_.empty()) {
97 #if defined(OS_LINUX) 96 #if defined(OS_LINUX)
98 // On Linux, unknown plugins require authorization. 97 // On Linux, unknown plugins require authorization.
99 return SECURITY_STATUS_REQUIRES_AUTHORIZATION; 98 return SECURITY_STATUS_REQUIRES_AUTHORIZATION;
100 #else 99 #else
101 return SECURITY_STATUS_UP_TO_DATE; 100 return SECURITY_STATUS_UP_TO_DATE;
102 #endif 101 #endif
103 } 102 }
104 103
105 Version version; 104 Version version;
106 webkit::npapi::CreateVersionFromString(plugin.version, &version); 105 webkit::WebPluginInfo::CreateVersionFromString(plugin.version, &version);
107 if (!version.IsValid()) 106 if (!version.IsValid())
108 version = Version("0"); 107 version = Version("0");
109 108
110 // |lower_bound| returns the latest version that is not newer than |version|. 109 // |lower_bound| returns the latest version that is not newer than |version|.
111 std::map<Version, SecurityStatus, VersionComparator>::const_iterator it = 110 std::map<Version, SecurityStatus, VersionComparator>::const_iterator it =
112 versions_.lower_bound(version); 111 versions_.lower_bound(version);
113 // If there is at least one version defined, everything older than the oldest 112 // If there is at least one version defined, everything older than the oldest
114 // defined version is considered out-of-date. 113 // defined version is considered out-of-date.
115 if (it == versions_.end()) 114 if (it == versions_.end())
116 return SECURITY_STATUS_OUT_OF_DATE; 115 return SECURITY_STATUS_OUT_OF_DATE;
(...skipping 11 matching lines...) Expand all
128 PluginMetadata* copy = new PluginMetadata(identifier_, 127 PluginMetadata* copy = new PluginMetadata(identifier_,
129 name_, 128 name_,
130 url_for_display_, 129 url_for_display_,
131 plugin_url_, 130 plugin_url_,
132 help_url_, 131 help_url_,
133 group_name_matcher_, 132 group_name_matcher_,
134 language_); 133 language_);
135 copy->versions_ = versions_; 134 copy->versions_ = versions_;
136 return make_scoped_ptr(copy); 135 return make_scoped_ptr(copy);
137 } 136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698