| OLD | NEW |
| 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 "components/sync_sessions/revisit/page_revisit_broadcaster.h" | 5 #include "components/sync_sessions/revisit/page_revisit_broadcaster.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 // Simple implementation of ForeignSessionsProvider that delegates to | 24 // Simple implementation of ForeignSessionsProvider that delegates to |
| 25 // SessionsSyncManager. It holds onto a non-owning pointer, with the assumption | 25 // SessionsSyncManager. It holds onto a non-owning pointer, with the assumption |
| 26 // that this class is only used by classes owned by SessionsSyncManager itself. | 26 // that this class is only used by classes owned by SessionsSyncManager itself. |
| 27 class SessionsSyncManagerWrapper : public ForeignSessionsProvider { | 27 class SessionsSyncManagerWrapper : public ForeignSessionsProvider { |
| 28 public: | 28 public: |
| 29 explicit SessionsSyncManagerWrapper(SessionsSyncManager* manager) | 29 explicit SessionsSyncManagerWrapper(SessionsSyncManager* manager) |
| 30 : manager_(manager) {} | 30 : manager_(manager) {} |
| 31 ~SessionsSyncManagerWrapper() override{}; | 31 ~SessionsSyncManagerWrapper() override {} |
| 32 bool GetAllForeignSessions( | 32 bool GetAllForeignSessions( |
| 33 std::vector<const SyncedSession*>* sessions) override { | 33 std::vector<const SyncedSession*>* sessions) override { |
| 34 return manager_->GetAllForeignSessions(sessions); | 34 return manager_->GetAllForeignSessions(sessions); |
| 35 } | 35 } |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 SessionsSyncManager* manager_; | 38 SessionsSyncManager* manager_; |
| 39 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManagerWrapper); | 39 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManagerWrapper); |
| 40 }; | 40 }; |
| 41 | 41 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 case ui::PAGE_TRANSITION_KEYWORD: | 122 case ui::PAGE_TRANSITION_KEYWORD: |
| 123 case ui::PAGE_TRANSITION_KEYWORD_GENERATED: | 123 case ui::PAGE_TRANSITION_KEYWORD_GENERATED: |
| 124 return PageVisitObserver::kTransitionOmniboxTemplateSearch; | 124 return PageVisitObserver::kTransitionOmniboxTemplateSearch; |
| 125 | 125 |
| 126 default: | 126 default: |
| 127 return PageVisitObserver::kTransitionUnknown; | 127 return PageVisitObserver::kTransitionUnknown; |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace sync_sessions | 131 } // namespace sync_sessions |
| OLD | NEW |