OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 const webkit::npapi::PluginGroup* group = | 269 const webkit::npapi::PluginGroup* group = |
270 webkit::npapi::PluginList::Singleton()->GetPluginGroup(info); | 270 webkit::npapi::PluginList::Singleton()->GetPluginGroup(info); |
271 DCHECK(group != NULL); | 271 DCHECK(group != NULL); |
272 | 272 |
273 ContentSetting outdated_policy = CONTENT_SETTING_ASK; | 273 ContentSetting outdated_policy = CONTENT_SETTING_ASK; |
274 ContentSetting authorize_policy = CONTENT_SETTING_ASK; | 274 ContentSetting authorize_policy = CONTENT_SETTING_ASK; |
275 if (group->IsVulnerable() || group->RequiresAuthorization()) { | 275 if (group->IsVulnerable() || group->RequiresAuthorization()) { |
276 // These policies are dynamic and can changed at runtime, so they aren't | 276 // These policies are dynamic and can changed at runtime, so they aren't |
277 // cached here. | 277 // cached here. |
278 render_view->Send(new ViewHostMsg_GetPluginPolicies( | 278 render_view->Send(new ViewHostMsg_GetPluginPolicies( |
279 render_view->routing_id(), &outdated_policy, &authorize_policy)); | 279 &outdated_policy, &authorize_policy)); |
280 } | 280 } |
281 | 281 |
282 if (group->IsVulnerable()) { | 282 if (group->IsVulnerable()) { |
283 if (outdated_policy == CONTENT_SETTING_ASK || | 283 if (outdated_policy == CONTENT_SETTING_ASK || |
284 outdated_policy == CONTENT_SETTING_BLOCK) { | 284 outdated_policy == CONTENT_SETTING_BLOCK) { |
285 if (outdated_policy == CONTENT_SETTING_ASK) { | 285 if (outdated_policy == CONTENT_SETTING_ASK) { |
286 render_view->Send(new ViewHostMsg_BlockedOutdatedPlugin( | 286 render_view->Send(new ViewHostMsg_BlockedOutdatedPlugin( |
287 render_view->routing_id(), group->GetGroupName(), | 287 render_view->routing_id(), group->GetGroupName(), |
288 GURL(group->GetUpdateURL()))); | 288 GURL(group->GetUpdateURL()))); |
289 } | 289 } |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 if (old_url.is_empty() && frame->opener()) | 554 if (old_url.is_empty() && frame->opener()) |
555 old_url = frame->opener()->url(); | 555 old_url = frame->opener()->url(); |
556 | 556 |
557 bool old_url_is_hosted_app = extensions->GetByURL(old_url) && | 557 bool old_url_is_hosted_app = extensions->GetByURL(old_url) && |
558 !extensions->GetByURL(old_url)->web_extent().is_empty(); | 558 !extensions->GetByURL(old_url)->web_extent().is_empty(); |
559 return !extensions->InSameExtent(old_url, new_url) && | 559 return !extensions->InSameExtent(old_url, new_url) && |
560 !old_url_is_hosted_app; | 560 !old_url_is_hosted_app; |
561 } | 561 } |
562 | 562 |
563 } // namespace chrome | 563 } // namespace chrome |
OLD | NEW |