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/renderer/content_settings_observer.h" | 5 #include "chrome/renderer/content_settings_observer.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "components/content_settings/content/common/content_settings_messages.h " | 9 #include "components/content_settings/content/common/content_settings_messages.h " |
10 #include "content/public/common/url_constants.h" | 10 #include "content/public/common/url_constants.h" |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
586 SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF); | 586 SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF); |
587 | 587 |
588 if (!allow_running_insecure_content_ && !allowed_per_settings) { | 588 if (!allow_running_insecure_content_ && !allowed_per_settings) { |
589 DidBlockContentType(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, origin.host()); | 589 DidBlockContentType(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, origin.host()); |
590 return false; | 590 return false; |
591 } | 591 } |
592 | 592 |
593 return true; | 593 return true; |
594 } | 594 } |
595 | 595 |
596 void ContentSettingsObserver::didUseKeygen() { | |
597 Send(new ChromeViewHostMsg_DidUseKeygen(routing_id())); | |
jochen (gone - plz use gerrit)
2015/11/25 08:54:34
i'd include the frame url here, so you can show wh
svaldez
2015/11/25 14:56:55
We're currently using the top-level origin for the
| |
598 } | |
599 | |
596 void ContentSettingsObserver::didNotAllowPlugins() { | 600 void ContentSettingsObserver::didNotAllowPlugins() { |
597 DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS); | 601 DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS); |
598 } | 602 } |
599 | 603 |
600 void ContentSettingsObserver::didNotAllowScript() { | 604 void ContentSettingsObserver::didNotAllowScript() { |
601 DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT); | 605 DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT); |
602 } | 606 } |
603 | 607 |
604 bool ContentSettingsObserver::AreNPAPIPluginsBlocked() const { | 608 bool ContentSettingsObserver::AreNPAPIPluginsBlocked() const { |
605 return npapi_plugins_blocked_; | 609 return npapi_plugins_blocked_; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
724 | 728 |
725 // If the scheme is file:, an empty file name indicates a directory listing, | 729 // If the scheme is file:, an empty file name indicates a directory listing, |
726 // which requires JavaScript to function properly. | 730 // which requires JavaScript to function properly. |
727 if (base::EqualsASCII(protocol, url::kFileScheme)) { | 731 if (base::EqualsASCII(protocol, url::kFileScheme)) { |
728 return document_url.SchemeIs(url::kFileScheme) && | 732 return document_url.SchemeIs(url::kFileScheme) && |
729 document_url.ExtractFileName().empty(); | 733 document_url.ExtractFileName().empty(); |
730 } | 734 } |
731 | 735 |
732 return false; | 736 return false; |
733 } | 737 } |
OLD | NEW |