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

Side by Side Diff: third_party/WebKit/Source/core/dom/ExecutionContext.cpp

Issue 1504403003: Calling isSecureContext() with no arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored isSecureContext() Created 5 years 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2012 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (m_windowInteractionTokens == 0) 257 if (m_windowInteractionTokens == 0)
258 return; 258 return;
259 --m_windowInteractionTokens; 259 --m_windowInteractionTokens;
260 } 260 }
261 261
262 bool ExecutionContext::isWindowInteractionAllowed() const 262 bool ExecutionContext::isWindowInteractionAllowed() const
263 { 263 {
264 return m_windowInteractionTokens > 0; 264 return m_windowInteractionTokens > 0;
265 } 265 }
266 266
267 bool ExecutionContext::isSecureContext(const SecureContextCheck privilegeContext Check) const
268 {
269 String unusedErrorMessage;
270 return isSecureContext(unusedErrorMessage, privilegeContextCheck);
271 }
272
267 void ExecutionContext::setReferrerPolicy(ReferrerPolicy referrerPolicy) 273 void ExecutionContext::setReferrerPolicy(ReferrerPolicy referrerPolicy)
268 { 274 {
269 // When a referrer policy has already been set, the latest value takes prece dence. 275 // When a referrer policy has already been set, the latest value takes prece dence.
270 UseCounter::count(this, UseCounter::SetReferrerPolicy); 276 UseCounter::count(this, UseCounter::SetReferrerPolicy);
271 if (m_referrerPolicy != ReferrerPolicyDefault) 277 if (m_referrerPolicy != ReferrerPolicyDefault)
272 UseCounter::count(this, UseCounter::ResetReferrerPolicy); 278 UseCounter::count(this, UseCounter::ResetReferrerPolicy);
273 279
274 m_referrerPolicy = referrerPolicy; 280 m_referrerPolicy = referrerPolicy;
275 } 281 }
276 282
(...skipping 20 matching lines...) Expand all
297 { 303 {
298 #if ENABLE(OILPAN) 304 #if ENABLE(OILPAN)
299 visitor->trace(m_pendingExceptions); 305 visitor->trace(m_pendingExceptions);
300 visitor->trace(m_publicURLManager); 306 visitor->trace(m_publicURLManager);
301 HeapSupplementable<ExecutionContext>::trace(visitor); 307 HeapSupplementable<ExecutionContext>::trace(visitor);
302 #endif 308 #endif
303 ContextLifecycleNotifier::trace(visitor); 309 ContextLifecycleNotifier::trace(visitor);
304 } 310 }
305 311
306 } // namespace blink 312 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698