Changeset 56330 in webkit
- Timestamp:
- Mar 22, 2010 4:07:45 AM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r56303 r56330 1 2010-03-22 Jochen Eisinger <jochen@chromium.org> 2 3 Reviewed by Jeremy Orlow. 4 5 Added methods to WebSecurityOrigin for invoking 6 SecurityOrigin::canAccess and SecurityOrigin::Create 7 https://bugs.webkit.org/show_bug.cgi?id=36356 8 9 * public/WebSecurityOrigin.h: 10 * src/WebSecurityOrigin.cpp: 11 (WebKit::WebSecurityOrigin::create): 12 (WebKit::WebSecurityOrigin::canAccess): 13 1 14 2010-03-20 Dimitri Glazkov <dglazkov@chromium.org> 2 15 -
trunk/WebKit/chromium/public/WebSecurityOrigin.h
r54214 r56330 1 1 /* 2 * Copyright (C) 20 09Google Inc. All rights reserved.2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 43 43 class WebSecurityOriginPrivate; 44 44 class WebString; 45 class WebURL; 45 46 46 47 class WebSecurityOrigin { … … 59 60 WEBKIT_API static WebSecurityOrigin* createFromDatabaseIdentifier(const WebString& databaseIdentifier); 60 61 WEBKIT_API static WebSecurityOrigin createFromString(const WebString&); 62 WEBKIT_API static WebSecurityOrigin create(const WebURL&); 61 63 62 64 WEBKIT_API void reset(); … … 71 73 // The empty WebSecurityOrigin is the least privileged WebSecurityOrigin. 72 74 WEBKIT_API bool isEmpty() const; 75 76 // Returns true if this SecurityOrigin can script objects in the given 77 // SecurityOrigin. For example, call this function before allowing 78 // script from one security origin to read or write objects from 79 // another SecurityOrigin. 80 WEBKIT_API bool canAccess(const WebSecurityOrigin&) const; 73 81 74 82 // Returns a string representation of the WebSecurityOrigin. The empty -
trunk/WebKit/chromium/src/WebSecurityOrigin.cpp
r54214 r56330 1 1 /* 2 * Copyright (C) 20 09Google Inc. All rights reserved.2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 32 32 #include "WebSecurityOrigin.h" 33 33 34 #include "KURL.h" 34 35 #include "SecurityOrigin.h" 35 36 #include "WebString.h" 37 #include "WebURL.h" 36 38 #include <wtf/PassRefPtr.h> 37 39 … … 51 53 { 52 54 return WebSecurityOrigin(SecurityOrigin::createFromString(origin)); 55 } 56 57 WebSecurityOrigin WebSecurityOrigin::create(const WebURL& url) 58 { 59 return WebSecurityOrigin(SecurityOrigin::create(url)); 53 60 } 54 61 … … 90 97 } 91 98 99 bool WebSecurityOrigin::canAccess(const WebSecurityOrigin& other) const 100 { 101 ASSERT(m_private); 102 ASSERT(other.m_private); 103 return m_private->canAccess(other.m_private); 104 } 105 92 106 WebString WebSecurityOrigin::toString() const 93 107 {
Note: See TracChangeset
for help on using the changeset viewer.