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

Side by Side Diff: chrome/browser/sessions/session_id.h

Issue 5705004: [SYNC] Sessions datatype refactor. Most things related to sessions under-the-... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebase Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/browser/sessions/session_restore.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_SESSIONS_SESSION_ID_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_ID_H_
6 #define CHROME_BROWSER_SESSIONS_SESSION_ID_H_ 6 #define CHROME_BROWSER_SESSIONS_SESSION_ID_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
11 class NavigationController; 11 class NavigationController;
12 class SessionService; 12 class SessionService;
13 namespace browser_sync {
14 class SessionModelAssociator;
15 }
13 16
14 // Uniquely identifies a tab or window for the duration of a session. 17 // Uniquely identifies a tab or window for the duration of a session.
15 class SessionID { 18 class SessionID {
16 public: 19 public:
17 typedef int32 id_type; 20 typedef int32 id_type;
18 21
19 SessionID(); 22 SessionID();
20 ~SessionID() {} 23 ~SessionID() {}
21 24
22 // Returns the underlying id. 25 // Returns the underlying id.
23 id_type id() const { return id_; } 26 id_type id() const { return id_; }
24 27
25 private: 28 private:
26 friend class NavigationController; 29 friend class NavigationController;
27 friend class SessionService; 30 friend class SessionService;
31 friend class browser_sync::SessionModelAssociator;
28 32
29 explicit SessionID(id_type id) : id_(id) {} 33 explicit SessionID(id_type id) : id_(id) {}
30 34
31 // Resets the id. This is used when restoring a session 35 // Resets the id. This is used when restoring a session
32 void set_id(id_type id) { id_ = id; } 36 void set_id(id_type id) { id_ = id; }
33 37
34 id_type id_; 38 id_type id_;
35 }; 39 };
36 40
37 #endif // CHROME_BROWSER_SESSIONS_SESSION_ID_H_ 41 #endif // CHROME_BROWSER_SESSIONS_SESSION_ID_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/browser/sessions/session_restore.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698