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

Side by Side Diff: components/sync_sessions/revisit/page_equality.h

Issue 1387253004: [Sync] Creating sync_sessions component, moving revisit logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing test_support target. Created 5 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
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 #ifndef COMPONENTS_SYNC_DRIVER_PAGE_EQUALITY_H_ 5 #ifndef COMPONENTS_SYNC_SESSIONS_REVISIT_PAGE_EQUALITY_H_
6 #define COMPONENTS_SYNC_DRIVER_PAGE_EQUALITY_H_ 6 #define COMPONENTS_SYNC_SESSIONS_REVISIT_PAGE_EQUALITY_H_
7 7
8 namespace sync_driver { 8 namespace sync_sessions {
9 9
10 // An extremely simplistic approach to determining page equality, given two 10 // An extremely simplistic approach to determining page equality, given two
11 // URLs. Some of the notable examples this fails to accommodate are varying 11 // URLs. Some of the notable examples this fails to accommodate are varying
12 // schemes, mobile subdomains, unimpactful query parameters/fragments, and 12 // schemes, mobile subdomains, unimpactful query parameters/fragments, and
13 // page changing headers/cookies. 13 // page changing headers/cookies.
14 class PageEquality { 14 class PageEquality {
15 public: 15 public:
16 explicit PageEquality(const GURL& url) : url_(url) {} 16 explicit PageEquality(const GURL& url) : url_(url) {}
17 PageEquality(const PageEquality&) = default; 17 PageEquality(const PageEquality&) = default;
18 bool IsSamePage(const GURL& url) const { return url == url_; } 18 bool IsSamePage(const GURL& url) const { return url == url_; }
19 19
20 private: 20 private:
21 const GURL url_; 21 const GURL url_;
22 }; 22 };
23 23
24 } // namespace sync_driver 24 } // namespace sync_sessions
25 25
26 #endif // COMPONENTS_SYNC_DRIVER_PAGE_EQUALITY_H_ 26 #endif // COMPONENTS_SYNC_SESSIONS_REVISIT_PAGE_EQUALITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698