Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / components / sync_driver / revisit / page_equality.h
blob7ad18d70d72883976e9d1d1982cc07d782980b02
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SYNC_DRIVER_PAGE_EQUALITY_H_
6 #define COMPONENTS_SYNC_DRIVER_PAGE_EQUALITY_H_
8 namespace sync_driver {
10 // An extremely simplistic approach to determining page equality, given two
11 // URLs. Some of the notable examples this fails to accommodate are varying
12 // schemes, mobile subdomains, unimpactful query parameters/fragments, and
13 // page changing headers/cookies.
14 class PageEquality {
15 public:
16 explicit PageEquality(const GURL& url) : url_(url) {}
17 PageEquality(const PageEquality&) = default;
18 bool IsSamePage(const GURL& url) const { return url == url_; }
20 private:
21 const GURL url_;
24 } // namespace sync_driver
26 #endif // COMPONENTS_SYNC_DRIVER_PAGE_EQUALITY_H_