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

Side by Side Diff: url/origin.cc

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Introduce NullableOrigin to use for request initiator Created 4 years, 2 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
« url/origin.h ('K') | « url/origin.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "url/origin.h" 5 #include "url/origin.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 std::ostream& operator<<(std::ostream& out, const url::Origin& origin) { 93 std::ostream& operator<<(std::ostream& out, const url::Origin& origin) {
94 return out << origin.Serialize(); 94 return out << origin.Serialize();
95 } 95 }
96 96
97 bool IsSameOriginWith(const GURL& a, const GURL& b) { 97 bool IsSameOriginWith(const GURL& a, const GURL& b) {
98 return Origin(a).IsSameOriginWith(Origin(b)); 98 return Origin(a).IsSameOriginWith(Origin(b));
99 } 99 }
100 100
101 NullableOrigin::NullableOrigin(const GURL& url) : Origin(url) {}
102 NullableOrigin::NullableOrigin(const Origin& origin) : Origin(origin) {}
103
104 NullableOrigin::~NullableOrigin() {}
105
101 } // namespace url 106 } // namespace url
OLDNEW
« url/origin.h ('K') | « url/origin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698