| OLD | NEW |
| 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/plugin_metadata.h" | 5 #include "chrome/browser/plugin_metadata.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "webkit/plugins/npapi/plugin_utils.h" | 8 #include "webkit/plugins/npapi/plugin_utils.h" |
| 9 #include "webkit/plugins/webplugininfo.h" | 9 #include "webkit/plugins/webplugininfo.h" |
| 10 | 10 |
| 11 // static |
| 12 const char PluginMetadata::kAdobeReaderGroupName[] = "Adobe Reader"; |
| 13 const char PluginMetadata::kJavaGroupName[] = "Java(TM)"; |
| 14 const char PluginMetadata::kQuickTimeGroupName[] = "QuickTime Player"; |
| 15 const char PluginMetadata::kShockwaveGroupName[] = "Adobe Shockwave Player"; |
| 16 const char PluginMetadata::kRealPlayerGroupName[] = "RealPlayer"; |
| 17 const char PluginMetadata::kSilverlightGroupName[] = "Silverlight"; |
| 18 const char PluginMetadata::kWindowsMediaPlayerGroupName[] = |
| 19 "Windows Media Player"; |
| 20 |
| 11 PluginMetadata::PluginMetadata(const std::string& identifier, | 21 PluginMetadata::PluginMetadata(const std::string& identifier, |
| 12 const string16& name, | 22 const string16& name, |
| 13 bool url_for_display, | 23 bool url_for_display, |
| 14 const GURL& plugin_url, | 24 const GURL& plugin_url, |
| 15 const GURL& help_url, | 25 const GURL& help_url, |
| 16 const string16& group_name_matcher) | 26 const string16& group_name_matcher) |
| 17 : identifier_(identifier), | 27 : identifier_(identifier), |
| 18 name_(name), | 28 name_(name), |
| 19 group_name_matcher_(group_name_matcher), | 29 group_name_matcher_(group_name_matcher), |
| 20 url_for_display_(url_for_display), | 30 url_for_display_(url_for_display), |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 return SECURITY_STATUS_OUT_OF_DATE; | 81 return SECURITY_STATUS_OUT_OF_DATE; |
| 72 | 82 |
| 73 return it->second; | 83 return it->second; |
| 74 } | 84 } |
| 75 | 85 |
| 76 bool PluginMetadata::VersionComparator::operator() (const Version& lhs, | 86 bool PluginMetadata::VersionComparator::operator() (const Version& lhs, |
| 77 const Version& rhs) const { | 87 const Version& rhs) const { |
| 78 // Keep versions ordered by newest (biggest) first. | 88 // Keep versions ordered by newest (biggest) first. |
| 79 return lhs.CompareTo(rhs) > 0; | 89 return lhs.CompareTo(rhs) > 0; |
| 80 } | 90 } |
| OLD | NEW |