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

Side by Side Diff: Source/platform/weborigin/SecurityOrigin.cpp

Issue 1060723002: Replace secure origin warning shortlink with an HTTPS shortlink to an HTTPS URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change link format as discussed. Created 5 years, 8 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 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 return true; 376 return true;
377 } 377 }
378 378
379 bool SecurityOrigin::canAccessFeatureRequiringSecureOrigin(String& errorMessage) const 379 bool SecurityOrigin::canAccessFeatureRequiringSecureOrigin(String& errorMessage) const
380 { 380 {
381 ASSERT(m_protocol != "data"); 381 ASSERT(m_protocol != "data");
382 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() || isLocalhost()) 382 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() || isLocalhost())
383 return true; 383 return true;
384 384
385 errorMessage = "Only secure origins are allowed. http://goo.gl/lq4gCo"; 385 errorMessage = "Only secure origins are allowed (see: https://goo.gl/Y0ZkNV) .";
386 return false; 386 return false;
387 } 387 }
388 388
389 SecurityOrigin::Policy SecurityOrigin::canShowNotifications() const 389 SecurityOrigin::Policy SecurityOrigin::canShowNotifications() const
390 { 390 {
391 if (m_universalAccess) 391 if (m_universalAccess)
392 return AlwaysAllow; 392 return AlwaysAllow;
393 if (isUnique()) 393 if (isUnique())
394 return AlwaysDeny; 394 return AlwaysDeny;
395 return Ask; 395 return Ask;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 532 }
533 533
534 void SecurityOrigin::transferPrivilegesFrom(const SecurityOrigin& origin) 534 void SecurityOrigin::transferPrivilegesFrom(const SecurityOrigin& origin)
535 { 535 {
536 m_universalAccess = origin.m_universalAccess; 536 m_universalAccess = origin.m_universalAccess;
537 m_canLoadLocalResources = origin.m_canLoadLocalResources; 537 m_canLoadLocalResources = origin.m_canLoadLocalResources;
538 m_enforceFilePathSeparation = origin.m_enforceFilePathSeparation; 538 m_enforceFilePathSeparation = origin.m_enforceFilePathSeparation;
539 } 539 }
540 540
541 } // namespace blink 541 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp ('k') | Source/platform/weborigin/SecurityOriginTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698