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

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

Issue 462843003: Cleanup namespace usage in public/platform/{Web[P-W]*,linux/*}.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 namespace blink { class SecurityOrigin; }
12 #else
13 #include <url/origin.h> 11 #include <url/origin.h>
14 #endif 12 #endif
15 13
16 namespace blink { 14 namespace blink {
17 15
16 class SecurityOrigin;
17
18 // WebSerializedOrigin represents a serialized Web Origin specified in RFC6454. 18 // WebSerializedOrigin represents a serialized Web Origin specified in RFC6454.
19 class WebSerializedOrigin { 19 class WebSerializedOrigin {
20 public: 20 public:
21 WebSerializedOrigin() : m_string("null") { } 21 WebSerializedOrigin() : m_string("null") { }
22 #if INSIDE_BLINK 22 #if INSIDE_BLINK
23 BLINK_PLATFORM_EXPORT WebSerializedOrigin(const blink::SecurityOrigin&); 23 BLINK_PLATFORM_EXPORT WebSerializedOrigin(const SecurityOrigin&);
24 #else 24 #else
25 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())) { }
26 operator url::Origin() const { return url::Origin(m_string.utf8()); } 26 operator url::Origin() const { return url::Origin(m_string.utf8()); }
27 #endif 27 #endif
28 28
29 const WebString& string() const 29 const WebString& string() const
30 { 30 {
31 return m_string; 31 return m_string;
32 } 32 }
33 33
34 private: 34 private:
35 const WebString m_string; 35 const WebString m_string;
36 }; 36 };
37 37
38 } // namespace blink 38 } // namespace blink
39 39
40 #endif // #ifndef SerializedOrigin_h 40 #endif // #ifndef SerializedOrigin_h
OLDNEW
« no previous file with comments | « public/platform/WebScrollbarThemePainter.h ('k') | public/platform/WebServiceWorkerProviderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698