Generate all extension schema namespaces as "api" and instead vary the generated...
[chromium-blink-merge.git] / url / deprecated_serialized_origin.h
blob2756e8134b9a9a8e0142c7d986c1fedba81e9d87
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
3 // found in the LICENSE file.
5 #ifndef URL_DEPRECATED_SERIALIZED_ORIGIN_H_
6 #define URL_DEPRECATED_SERIALIZED_ORIGIN_H_
8 #include <string>
10 #include "url/url_export.h"
12 namespace url {
14 // DeprecatedSerializedOrigin represents a Web Origin serialized to a string.
15 // See RFC6454 for details.
17 // TODO(mkwst): Replace callsites with 'url::SchemeHostPort' or 'Origin', once
18 // those classes exist.
19 class URL_EXPORT DeprecatedSerializedOrigin {
20 public:
21 DeprecatedSerializedOrigin();
22 explicit DeprecatedSerializedOrigin(const std::string& origin);
24 const std::string& string() const { return string_; }
26 bool IsSameAs(const DeprecatedSerializedOrigin& that) const {
27 return string_ == that.string_;
30 private:
31 std::string string_;
34 } // namespace url
36 #endif // URL_DEPRECATED_SERIALIZED_ORIGIN_H_