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

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

Issue 814183002: Record eTLD+1 for pages that show the mixed content shield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing browser_process import. Created 5 years, 11 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/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 "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "content/public/common/url_constants.h" 10 #include "content/public/common/url_constants.h"
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 SendInsecureContentSignal(INSECURE_CONTENT_RUN_TARGET_YOUTUBE); 573 SendInsecureContentSignal(INSECURE_CONTENT_RUN_TARGET_YOUTUBE);
574 574
575 if (EndsWith(resource_gurl.path(), kDotJS, false)) 575 if (EndsWith(resource_gurl.path(), kDotJS, false))
576 SendInsecureContentSignal(INSECURE_CONTENT_RUN_JS); 576 SendInsecureContentSignal(INSECURE_CONTENT_RUN_JS);
577 else if (EndsWith(resource_gurl.path(), kDotCSS, false)) 577 else if (EndsWith(resource_gurl.path(), kDotCSS, false))
578 SendInsecureContentSignal(INSECURE_CONTENT_RUN_CSS); 578 SendInsecureContentSignal(INSECURE_CONTENT_RUN_CSS);
579 else if (EndsWith(resource_gurl.path(), kDotSWF, false)) 579 else if (EndsWith(resource_gurl.path(), kDotSWF, false))
580 SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF); 580 SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF);
581 581
582 if (!allow_running_insecure_content_ && !allowed_per_settings) { 582 if (!allow_running_insecure_content_ && !allowed_per_settings) {
583 DidBlockContentType(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT); 583 DidBlockContentType(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, origin.host());
584 return false; 584 return false;
585 } 585 }
586 586
587 return true; 587 return true;
588 } 588 }
589 589
590 void ContentSettingsObserver::didNotAllowPlugins() { 590 void ContentSettingsObserver::didNotAllowPlugins() {
591 DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS); 591 DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
592 } 592 }
593 593
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 717
718 // If the scheme is file:, an empty file name indicates a directory listing, 718 // If the scheme is file:, an empty file name indicates a directory listing,
719 // which requires JavaScript to function properly. 719 // which requires JavaScript to function properly.
720 if (EqualsASCII(origin.protocol(), url::kFileScheme)) { 720 if (EqualsASCII(origin.protocol(), url::kFileScheme)) {
721 return document_url.SchemeIs(url::kFileScheme) && 721 return document_url.SchemeIs(url::kFileScheme) &&
722 document_url.ExtractFileName().empty(); 722 document_url.ExtractFileName().empty();
723 } 723 }
724 724
725 return false; 725 return false;
726 } 726 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.cc ('k') | tools/metrics/rappor/rappor.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698