| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_TRACKER_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_TRACKER_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_TRACKER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
| 16 #include "chrome/browser/sessions/session_id.h" | 16 #include "chrome/browser/sessions/session_id.h" |
| 17 #include "chrome/browser/sessions/session_types.h" | 17 #include "chrome/browser/sessions/session_types.h" |
| 18 #include "chrome/browser/sync/glue/synced_session.h" | |
| 19 | 18 |
| 20 namespace browser_sync { | 19 namespace browser_sync { |
| 21 | 20 |
| 22 // Class to manage synced sessions. The tracker will own all SyncedSession | 21 // Class to manage synced sessions. The tracker will own all SyncedSession |
| 23 // and SessionTab objects it creates, and deletes them appropriately on | 22 // and SessionTab objects it creates, and deletes them appropriately on |
| 24 // destruction. | 23 // destruction. |
| 25 // Note: SyncedSession objects are created for all synced sessions, including | 24 // Note: SyncedSession objects are created for all synced sessions, including |
| 26 // the local session (whose tag we maintain separately). | 25 // the local session (whose tag we maintain separately). |
| 27 class SyncedSessionTracker { | 26 class SyncedSessionTracker { |
| 28 public: | 27 public: |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // The tag for this machine's local session, so we can distinguish the foreign | 116 // The tag for this machine's local session, so we can distinguish the foreign |
| 118 // sessions. | 117 // sessions. |
| 119 std::string local_session_tag_; | 118 std::string local_session_tag_; |
| 120 | 119 |
| 121 DISALLOW_COPY_AND_ASSIGN(SyncedSessionTracker); | 120 DISALLOW_COPY_AND_ASSIGN(SyncedSessionTracker); |
| 122 }; | 121 }; |
| 123 | 122 |
| 124 } // namespace browser_sync | 123 } // namespace browser_sync |
| 125 | 124 |
| 126 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_TRACKER_H_ | 125 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_TRACKER_H_ |
| OLD | NEW |