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

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

Issue 1857263004: Always trust internal PDF viewer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase rebase Created 4 years, 8 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // static 82 // static
83 bool PluginMetadata::ParseSecurityStatus( 83 bool PluginMetadata::ParseSecurityStatus(
84 const std::string& status_str, 84 const std::string& status_str,
85 PluginMetadata::SecurityStatus* status) { 85 PluginMetadata::SecurityStatus* status) {
86 if (status_str == "up_to_date") 86 if (status_str == "up_to_date")
87 *status = SECURITY_STATUS_UP_TO_DATE; 87 *status = SECURITY_STATUS_UP_TO_DATE;
88 else if (status_str == "out_of_date") 88 else if (status_str == "out_of_date")
89 *status = SECURITY_STATUS_OUT_OF_DATE; 89 *status = SECURITY_STATUS_OUT_OF_DATE;
90 else if (status_str == "requires_authorization") 90 else if (status_str == "requires_authorization")
91 *status = SECURITY_STATUS_REQUIRES_AUTHORIZATION; 91 *status = SECURITY_STATUS_REQUIRES_AUTHORIZATION;
92 else if (status_str == "fully_trusted")
93 *status = SECURITY_STATUS_FULLY_TRUSTED;
92 else 94 else
93 return false; 95 return false;
94 96
95 return true; 97 return true;
96 } 98 }
97 99
98 PluginMetadata::SecurityStatus PluginMetadata::GetSecurityStatus( 100 PluginMetadata::SecurityStatus PluginMetadata::GetSecurityStatus(
99 const content::WebPluginInfo& plugin) const { 101 const content::WebPluginInfo& plugin) const {
100 if (versions_.empty()) { 102 if (versions_.empty()) {
101 // Unknown plugins require authorization. 103 // Unknown plugins require authorization.
(...skipping 26 matching lines...) Expand all
128 PluginMetadata* copy = new PluginMetadata(identifier_, 130 PluginMetadata* copy = new PluginMetadata(identifier_,
129 name_, 131 name_,
130 url_for_display_, 132 url_for_display_,
131 plugin_url_, 133 plugin_url_,
132 help_url_, 134 help_url_,
133 group_name_matcher_, 135 group_name_matcher_,
134 language_); 136 language_);
135 copy->versions_ = versions_; 137 copy->versions_ = versions_;
136 return make_scoped_ptr(copy); 138 return make_scoped_ptr(copy);
137 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_metadata.h ('k') | chrome/browser/resources/plugin_metadata/plugins_chromeos.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698