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

Side by Side Diff: chrome/renderer/content_settings_observer.cc

Issue 1424933014: Fix Rappor stats reporting for MixedContent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 base::CompareCase::INSENSITIVE_ASCII)) 579 base::CompareCase::INSENSITIVE_ASCII))
580 SendInsecureContentSignal(INSECURE_CONTENT_RUN_JS); 580 SendInsecureContentSignal(INSECURE_CONTENT_RUN_JS);
581 else if (base::EndsWith(resource_gurl.path(), kDotCSS, 581 else if (base::EndsWith(resource_gurl.path(), kDotCSS,
582 base::CompareCase::INSENSITIVE_ASCII)) 582 base::CompareCase::INSENSITIVE_ASCII))
583 SendInsecureContentSignal(INSECURE_CONTENT_RUN_CSS); 583 SendInsecureContentSignal(INSECURE_CONTENT_RUN_CSS);
584 else if (base::EndsWith(resource_gurl.path(), kDotSWF, 584 else if (base::EndsWith(resource_gurl.path(), kDotSWF,
585 base::CompareCase::INSENSITIVE_ASCII)) 585 base::CompareCase::INSENSITIVE_ASCII))
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.toString());
lgarron 2015/11/06 23:25:08 This seems like a good semantic fix. Were you abl
Jialiu Lin 2015/11/07 00:23:43 I traced this details field, it basically can cont
590 return false; 590 return false;
591 } 591 }
592 592
593 return true; 593 return true;
594 } 594 }
595 595
596 void ContentSettingsObserver::didNotAllowPlugins() { 596 void ContentSettingsObserver::didNotAllowPlugins() {
597 DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS); 597 DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
598 } 598 }
599 599
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 // If the scheme is file:, an empty file name indicates a directory listing, 725 // If the scheme is file:, an empty file name indicates a directory listing,
726 // which requires JavaScript to function properly. 726 // which requires JavaScript to function properly.
727 if (base::EqualsASCII(protocol, url::kFileScheme)) { 727 if (base::EqualsASCII(protocol, url::kFileScheme)) {
728 return document_url.SchemeIs(url::kFileScheme) && 728 return document_url.SchemeIs(url::kFileScheme) &&
729 document_url.ExtractFileName().empty(); 729 document_url.ExtractFileName().empty();
730 } 730 }
731 731
732 return false; 732 return false;
733 } 733 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698