diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebKit/mac/Storage | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebKit/mac/Storage')
-rw-r--r-- | WebKit/mac/Storage/WebDatabaseManager.mm | 1 | ||||
-rw-r--r-- | WebKit/mac/Storage/WebDatabaseTrackerClient.mm | 1 | ||||
-rw-r--r-- | WebKit/mac/Storage/WebSecurityOrigin.mm | 24 | ||||
-rw-r--r-- | WebKit/mac/Storage/WebSecurityOriginInternal.h | 2 | ||||
-rw-r--r-- | WebKit/mac/Storage/WebSecurityOriginPrivate.h | 5 |
5 files changed, 16 insertions, 17 deletions
diff --git a/WebKit/mac/Storage/WebDatabaseManager.mm b/WebKit/mac/Storage/WebDatabaseManager.mm index c975007..fa9eea6 100644 --- a/WebKit/mac/Storage/WebDatabaseManager.mm +++ b/WebKit/mac/Storage/WebDatabaseManager.mm @@ -30,7 +30,6 @@ #import "WebDatabaseManagerInternal.h" #import "WebDatabaseTrackerClient.h" -#import "WebSecurityOriginPrivate.h" #import "WebSecurityOriginInternal.h" #import <WebCore/DatabaseTracker.h> diff --git a/WebKit/mac/Storage/WebDatabaseTrackerClient.mm b/WebKit/mac/Storage/WebDatabaseTrackerClient.mm index 7a2c809..48530d6 100644 --- a/WebKit/mac/Storage/WebDatabaseTrackerClient.mm +++ b/WebKit/mac/Storage/WebDatabaseTrackerClient.mm @@ -29,7 +29,6 @@ #import "WebDatabaseTrackerClient.h" #import "WebDatabaseManagerPrivate.h" -#import "WebSecurityOriginPrivate.h" #import "WebSecurityOriginInternal.h" #import <wtf/RetainPtr.h> #import <WebCore/SecurityOrigin.h> diff --git a/WebKit/mac/Storage/WebSecurityOrigin.mm b/WebKit/mac/Storage/WebSecurityOrigin.mm index c980744..85313d0 100644 --- a/WebKit/mac/Storage/WebSecurityOrigin.mm +++ b/WebKit/mac/Storage/WebSecurityOrigin.mm @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,29 +25,23 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#import "WebSecurityOriginPrivate.h" #import "WebSecurityOriginInternal.h" #import <WebCore/DatabaseTracker.h> +#import <WebCore/KURL.h> #import <WebCore/SecurityOrigin.h> using namespace WebCore; @implementation WebSecurityOrigin - -- (id)initWithProtocol:(NSString *)protocol domain:(NSString *)domain -{ - return [self initWithProtocol:protocol domain:domain port:0]; -} - -- (id)initWithProtocol:(NSString *)protocol domain:(NSString *)domain port:(unsigned short)port +- (id)initWithURL:(NSURL *)url { self = [super init]; if (!self) return nil; - - RefPtr<SecurityOrigin> origin = SecurityOrigin::create(protocol, domain, port, 0); + + RefPtr<SecurityOrigin> origin = SecurityOrigin::create(KURL([url absoluteURL])); origin->ref(); _private = reinterpret_cast<WebSecurityOriginPrivate*>(origin.get()); @@ -59,11 +53,17 @@ using namespace WebCore; return reinterpret_cast<SecurityOrigin*>(_private)->protocol(); } -- (NSString*)domain +- (NSString*)host { return reinterpret_cast<SecurityOrigin*>(_private)->host(); } +// Deprecated. Use host instead. This needs to stay here until we ship a new Safari. +- (NSString*)domain +{ + return [self host]; +} + - (unsigned short)port { return reinterpret_cast<SecurityOrigin*>(_private)->port(); diff --git a/WebKit/mac/Storage/WebSecurityOriginInternal.h b/WebKit/mac/Storage/WebSecurityOriginInternal.h index d60f52b..7bd6817 100644 --- a/WebKit/mac/Storage/WebSecurityOriginInternal.h +++ b/WebKit/mac/Storage/WebSecurityOriginInternal.h @@ -26,6 +26,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "WebSecurityOriginPrivate.h" + namespace WebCore { class SecurityOrigin; } diff --git a/WebKit/mac/Storage/WebSecurityOriginPrivate.h b/WebKit/mac/Storage/WebSecurityOriginPrivate.h index 1e66f42..0796c6e 100644 --- a/WebKit/mac/Storage/WebSecurityOriginPrivate.h +++ b/WebKit/mac/Storage/WebSecurityOriginPrivate.h @@ -32,11 +32,10 @@ WebSecurityOriginPrivate *_private; } -- (id)initWithProtocol:(NSString *)protocol domain:(NSString *)domain; -- (id)initWithProtocol:(NSString *)protocol domain:(NSString *)domain port:(unsigned short)port; +- (id)initWithURL:(NSURL *)url; - (NSString*)protocol; -- (NSString*)domain; +- (NSString*)host; // Returns zero if the port is the default port for the protocol, non-zero otherwise - (unsigned short)port; |