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

Side by Side Diff: components/sync_driver/revisit/current_tab_matcher.h

Issue 1361613002: Move all core files in //components/sessions into core/ subdir (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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_CURRENT_TAB_MATCHER_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_CURRENT_TAB_MATCHER_H_
6 #define COMPONENTS_SYNC_DRIVER_CURRENT_TAB_MATCHER_H_ 6 #define COMPONENTS_SYNC_DRIVER_CURRENT_TAB_MATCHER_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "components/sessions/session_types.h" 9 #include "components/sessions/core/session_types.h"
10 #include "components/sync_driver/revisit/page_equality.h" 10 #include "components/sync_driver/revisit/page_equality.h"
11 #include "components/sync_driver/revisit/page_visit_observer.h" 11 #include "components/sync_driver/revisit/page_visit_observer.h"
12 12
13 namespace sync_driver { 13 namespace sync_driver {
14 14
15 // This class checks the current navigation entry for the given tabs to see if 15 // This class checks the current navigation entry for the given tabs to see if
16 // they correspond to the same page we were constructed to look for. Upon 16 // they correspond to the same page we were constructed to look for. Upon
17 // finding multiple matches, the most recently modified will be chosen. 17 // finding multiple matches, the most recently modified will be chosen.
18 class CurrentTabMatcher { 18 class CurrentTabMatcher {
19 public: 19 public:
20 explicit CurrentTabMatcher(const PageEquality& page_equality); 20 explicit CurrentTabMatcher(const PageEquality& page_equality);
21 void Check(const sessions::SessionTab* tab); 21 void Check(const sessions::SessionTab* tab);
22 void Emit(const PageVisitObserver::TransitionType transition); 22 void Emit(const PageVisitObserver::TransitionType transition);
23 23
24 private: 24 private:
25 FRIEND_TEST_ALL_PREFIXES(CurrentTabMatcherTest, Timestamp); 25 FRIEND_TEST_ALL_PREFIXES(CurrentTabMatcherTest, Timestamp);
26 26
27 const PageEquality page_equality_; 27 const PageEquality page_equality_;
28 const sessions::SessionTab* most_recent_match_ = nullptr; 28 const sessions::SessionTab* most_recent_match_ = nullptr;
29 29
30 DISALLOW_COPY_AND_ASSIGN(CurrentTabMatcher); 30 DISALLOW_COPY_AND_ASSIGN(CurrentTabMatcher);
31 }; 31 };
32 32
33 } // namespace sync_driver 33 } // namespace sync_driver
34 34
35 #endif // COMPONENTS_SYNC_DRIVER_CURRENT_TAB_MATCHER_H_ 35 #endif // COMPONENTS_SYNC_DRIVER_CURRENT_TAB_MATCHER_H_
OLDNEW
« no previous file with comments | « components/sync_driver/open_tabs_ui_delegate.h ('k') | components/sync_driver/revisit/current_tab_matcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698