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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp

Issue 2046593003: Fix Document::firstPartyForCookies() for OOPIFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use the top frame in the remote case and add a test Created 4 years, 6 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) 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 MutexLocker locker(mutex()); 395 MutexLocker locker(mutex());
396 return fetchAPISchemes().contains(scheme); 396 return fetchAPISchemes().contains(scheme);
397 } 397 }
398 398
399 void SchemeRegistry::registerURLSchemeAsFirstPartyWhenTopLevel(const String& sch eme) 399 void SchemeRegistry::registerURLSchemeAsFirstPartyWhenTopLevel(const String& sch eme)
400 { 400 {
401 MutexLocker locker(mutex()); 401 MutexLocker locker(mutex());
402 firstPartyWhenTopLevelSchemes().add(scheme); 402 firstPartyWhenTopLevelSchemes().add(scheme);
403 } 403 }
404 404
405 void SchemeRegistry::removeURLSchemeAsFirstPartyWhenTopLevel(const String& schem e)
406 {
407 MutexLocker locker(mutex());
408 firstPartyWhenTopLevelSchemes().remove(scheme);
409 }
410
405 bool SchemeRegistry::shouldTreatURLSchemeAsFirstPartyWhenTopLevel(const String& scheme) 411 bool SchemeRegistry::shouldTreatURLSchemeAsFirstPartyWhenTopLevel(const String& scheme)
406 { 412 {
407 if (scheme.isEmpty()) 413 if (scheme.isEmpty())
408 return false; 414 return false;
409 MutexLocker locker(mutex()); 415 MutexLocker locker(mutex());
410 return firstPartyWhenTopLevelSchemes().contains(scheme); 416 return firstPartyWhenTopLevelSchemes().contains(scheme);
411 } 417 }
412 418
413 void SchemeRegistry::registerURLSchemeAsAllowedForReferrer(const String& scheme) 419 void SchemeRegistry::registerURLSchemeAsAllowedForReferrer(const String& scheme)
414 { 420 {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 468
463 bool SchemeRegistry::schemeShouldBypassSecureContextCheck(const String& scheme) 469 bool SchemeRegistry::schemeShouldBypassSecureContextCheck(const String& scheme)
464 { 470 {
465 if (scheme.isEmpty()) 471 if (scheme.isEmpty())
466 return false; 472 return false;
467 MutexLocker locker(mutex()); 473 MutexLocker locker(mutex());
468 return secureContextBypassingSchemes().contains(scheme.lower()); 474 return secureContextBypassingSchemes().contains(scheme.lower());
469 } 475 }
470 476
471 } // namespace blink 477 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698