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

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

Issue 1655413002: Merge updateSecurityOrigin() and setSecurityOrigin(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 4998 matching lines...) Expand 10 before | Expand all | Expand 10 after
5009 LocalFrame* frame = executingFrame(); 5009 LocalFrame* frame = executingFrame();
5010 if (!frame) 5010 if (!frame)
5011 return false; 5011 return false;
5012 if (!node->document().executingFrame()) 5012 if (!node->document().executingFrame())
5013 return false; 5013 return false;
5014 if (!frame->script().canExecuteScripts(AboutToExecuteScript)) 5014 if (!frame->script().canExecuteScripts(AboutToExecuteScript))
5015 return false; 5015 return false;
5016 return true; 5016 return true;
5017 } 5017 }
5018 5018
5019 void Document::updateSecurityOrigin(PassRefPtr<SecurityOrigin> origin)
5020 {
5021 setSecurityOrigin(origin);
5022 didUpdateSecurityOrigin();
5023 }
5024
5025 void Document::didUpdateSecurityOrigin() 5019 void Document::didUpdateSecurityOrigin()
5026 { 5020 {
5027 if (!m_frame) 5021 if (!m_frame)
5028 return; 5022 return;
5029 m_frame->updateSecurityOrigin(securityOrigin()); 5023 m_frame->updateSecurityOrigin(securityOrigin());
5030 } 5024 }
5031 5025
5032 bool Document::isContextThread() const 5026 bool Document::isContextThread() const
5033 { 5027 {
5034 return isMainThread(); 5028 return isMainThread();
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
5943 #ifndef NDEBUG 5937 #ifndef NDEBUG
5944 using namespace blink; 5938 using namespace blink;
5945 void showLiveDocumentInstances() 5939 void showLiveDocumentInstances()
5946 { 5940 {
5947 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5941 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5948 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5942 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5949 for (Document* document : set) 5943 for (Document* document : set)
5950 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5944 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5951 } 5945 }
5952 #endif 5946 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/SecurityContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698