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

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

Issue 988293002: platform apps: Disables history.pushState/replaceState in platform_app.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 447 }
448 } 448 }
449 #endif 449 #endif
450 return allowed; 450 return allowed;
451 } 451 }
452 452
453 bool ContentSettingsObserver::allowMutationEvents(bool default_value) { 453 bool ContentSettingsObserver::allowMutationEvents(bool default_value) {
454 return IsPlatformApp() ? false : default_value; 454 return IsPlatformApp() ? false : default_value;
455 } 455 }
456 456
457 bool ContentSettingsObserver::allowPushState() {
458 return !IsPlatformApp();
459 }
460
461 static void SendInsecureContentSignal(int signal) { 457 static void SendInsecureContentSignal(int signal) {
462 UMA_HISTOGRAM_ENUMERATION("SSL.InsecureContent", signal, 458 UMA_HISTOGRAM_ENUMERATION("SSL.InsecureContent", signal,
463 INSECURE_CONTENT_NUM_EVENTS); 459 INSECURE_CONTENT_NUM_EVENTS);
464 } 460 }
465 461
466 bool ContentSettingsObserver::allowDisplayingInsecureContent( 462 bool ContentSettingsObserver::allowDisplayingInsecureContent(
467 bool allowed_per_settings, 463 bool allowed_per_settings,
468 const blink::WebSecurityOrigin& origin, 464 const blink::WebSecurityOrigin& origin,
469 const blink::WebURL& resource_url) { 465 const blink::WebURL& resource_url) {
470 SendInsecureContentSignal(INSECURE_CONTENT_DISPLAY); 466 SendInsecureContentSignal(INSECURE_CONTENT_DISPLAY);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 711
716 // If the scheme is file:, an empty file name indicates a directory listing, 712 // If the scheme is file:, an empty file name indicates a directory listing,
717 // which requires JavaScript to function properly. 713 // which requires JavaScript to function properly.
718 if (EqualsASCII(origin.protocol(), url::kFileScheme)) { 714 if (EqualsASCII(origin.protocol(), url::kFileScheme)) {
719 return document_url.SchemeIs(url::kFileScheme) && 715 return document_url.SchemeIs(url::kFileScheme) &&
720 document_url.ExtractFileName().empty(); 716 document_url.ExtractFileName().empty();
721 } 717 }
722 718
723 return false; 719 return false;
724 } 720 }
OLDNEW
« no previous file with comments | « chrome/renderer/content_settings_observer.h ('k') | chrome/test/data/extensions/platform_apps/restrictions/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698