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

Side by Side Diff: public/platform/WebSerializedOrigin.h

Issue 1235673003: Revert of Remove 'blink::WebSerializedOrigin' (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/platform/exported/WebSerializedOrigin.cpp ('k') | public/platform/WebSocketHandle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebSerializedOrigin_h 5 #ifndef WebSerializedOrigin_h
6 #define WebSerializedOrigin_h 6 #define WebSerializedOrigin_h
7 7
8 #include "WebString.h" 8 #include "WebString.h"
9 9
10 #if !INSIDE_BLINK 10 #if !INSIDE_BLINK
11 #include <url/origin.h> 11 #include <url/origin.h>
12 #endif 12 #endif
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class SecurityOrigin; 16 class SecurityOrigin;
17 class WebSecurityOrigin;
18 17
19 // WebSerializedOrigin represents a serialized Web Origin specified in RFC6454. 18 // WebSerializedOrigin represents a serialized Web Origin specified in RFC6454.
20 class WebSerializedOrigin { 19 class WebSerializedOrigin {
21 public: 20 public:
22 WebSerializedOrigin() : m_string("null") { } 21 WebSerializedOrigin() : m_string("null") { }
23 BLINK_PLATFORM_EXPORT WebSerializedOrigin(const WebSecurityOrigin&);
24
25 #if INSIDE_BLINK 22 #if INSIDE_BLINK
26 BLINK_PLATFORM_EXPORT WebSerializedOrigin(const SecurityOrigin&); 23 BLINK_PLATFORM_EXPORT WebSerializedOrigin(const SecurityOrigin&);
27 #else 24 #else
28 WebSerializedOrigin(const url::Origin& origin) : m_string(WebString::fromUTF 8(origin.string())) { } 25 WebSerializedOrigin(const url::Origin& origin) : m_string(WebString::fromUTF 8(origin.string())) { }
29 operator url::Origin() const { return url::Origin(m_string.utf8()); } 26 operator url::Origin() const { return url::Origin(m_string.utf8()); }
30 #endif 27 #endif
31 28
32 const WebString& string() const 29 const WebString& string() const
33 { 30 {
34 return m_string; 31 return m_string;
35 } 32 }
36 33
37 private: 34 private:
38 const WebString m_string; 35 const WebString m_string;
39 }; 36 };
40 37
41 } // namespace blink 38 } // namespace blink
42 39
43 #endif // #ifndef SerializedOrigin_h 40 #endif // #ifndef SerializedOrigin_h
OLDNEW
« no previous file with comments | « Source/platform/exported/WebSerializedOrigin.cpp ('k') | public/platform/WebSocketHandle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698