Index: components/sync_driver/revisit/sessions_page_revisit_observer.h |
diff --git a/components/sync_driver/revisit/sessions_page_revisit_observer.h b/components/sync_driver/revisit/sessions_page_revisit_observer.h |
deleted file mode 100644 |
index a00fbf0558f52d63a58392e47941916e01295dcd..0000000000000000000000000000000000000000 |
--- a/components/sync_driver/revisit/sessions_page_revisit_observer.h |
+++ /dev/null |
@@ -1,65 +0,0 @@ |
-// Copyright 2015 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 COMPONENTS_SYNC_DRIVER_REVISIT_SESSIONS_PAGE_REVISIT_OBSERVER_H_ |
-#define COMPONENTS_SYNC_DRIVER_REVISIT_SESSIONS_PAGE_REVISIT_OBSERVER_H_ |
- |
-#include <vector> |
- |
-#include "base/memory/scoped_ptr.h" |
-#include "base/memory/weak_ptr.h" |
-#include "components/sync_driver/revisit/page_visit_observer.h" |
-#include "url/gurl.h" |
- |
-namespace sessions { |
-struct SessionTab; |
-} // namespace sessions |
- |
-namespace sync_driver { |
- |
-struct SyncedSession; |
- |
-class CurrentTabMatcher; |
-class OffsetTabMatcher; |
- |
-// A simple interface to abstract away who is providing sessions. |
-class ForeignSessionsProvider { |
- public: |
- // Fills the already instantiated passed vector with all foreign sessions. |
- // Returned boolean representes if there were foreign sessions and the vector |
- // should be examimed. |
- virtual bool GetAllForeignSessions( |
- std::vector<const sync_driver::SyncedSession*>* sessions) = 0; |
- virtual ~ForeignSessionsProvider() {} |
-}; |
- |
-// An implementation of PageVisitObserver that checks the given page's url |
-// against in memory session information to detect if we've seen this page |
-// before, constituting a revisit. Then histogram information is emitted about |
-// this page navigation. |
-class SessionsPageRevisitObserver |
- : public PageVisitObserver, |
- public base::SupportsWeakPtr<SessionsPageRevisitObserver> { |
- public: |
- explicit SessionsPageRevisitObserver( |
- scoped_ptr<ForeignSessionsProvider> provider); |
- ~SessionsPageRevisitObserver() override; |
- void OnPageVisit(const GURL& url, const TransitionType transition) override; |
- |
- private: |
- friend class SessionsPageRevisitObserverTest; |
- |
- // Although the signature is identical to OnPageVisit(...), this method |
- // actually does all of the work. The assumption is that this method is the |
- // target of a PostTask call coming from OnPageVisit(...). |
- void CheckForRevisit(const GURL& url, const TransitionType transition); |
- |
- scoped_ptr<ForeignSessionsProvider> provider_; |
- |
- DISALLOW_COPY_AND_ASSIGN(SessionsPageRevisitObserver); |
-}; |
- |
-} // namespace sync_driver |
- |
-#endif // COMPONENTS_SYNC_DRIVER_REVISIT_SESSIONS_PAGE_REVISIT_OBSERVER_H_ |