| Index: url/serialized_origin.h
|
| diff --git a/url/serialized_origin.h b/url/serialized_origin.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5a57c0c3655ce6ef09367fa785100f0423d6cc55
|
| --- /dev/null
|
| +++ b/url/serialized_origin.h
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef URL_SERIALIZED_ORIGIN_H_
|
| +#define URL_SERIALIZED_ORIGIN_H_
|
| +
|
| +#include <iosfwd>
|
| +#include <string>
|
| +#include "url/url_export.h"
|
| +
|
| +// SerializedOrigin represents a Web Origin serialized to a string.
|
| +// See RFC6454 for details.
|
| +class URL_EXPORT SerializedOrigin {
|
| + public:
|
| + SerializedOrigin();
|
| + explicit SerializedOrigin(const std::string& origin);
|
| +
|
| + const std::string& string() const { return string_; }
|
| +
|
| + bool operator==(const SerializedOrigin& that) const {
|
| + return string_ == that.string_;
|
| + }
|
| +
|
| + private:
|
| + std::string string_;
|
| +};
|
| +
|
| +URL_EXPORT std::ostream& operator<<(std::ostream& out,
|
| + const SerializedOrigin& origin);
|
| +
|
| +#endif // URL_SERIALIZED_ORIGIN_H_
|
|
|