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

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

Issue 10891044: RestoreTabHelper > SessionTabHelper, move more session stuff into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/sessions/session_id.h" 5 #include "chrome/browser/sessions/session_id.h"
6 6
7 #include "chrome/browser/sessions/restore_tab_helper.h" 7 #include "chrome/browser/sessions/session_tab_helper.h"
8 #include "chrome/browser/ui/tab_contents/tab_contents.h" 8 #include "chrome/browser/ui/tab_contents/tab_contents.h"
9 9
10 static SessionID::id_type next_id = 1; 10 static SessionID::id_type next_id = 1;
11 11
12 SessionID::SessionID() { 12 SessionID::SessionID() {
13 id_ = next_id++; 13 id_ = next_id++;
14 } 14 }
15 15
16 SessionID::id_type SessionID::IdForTab(const TabContents* tab) { 16 SessionID::id_type SessionID::IdForTab(const TabContents* tab) {
17 return tab ? tab->restore_tab_helper()->session_id().id() : -1; 17 return tab ? tab->session_tab_helper()->session_id().id() : -1;
18 } 18 }
19 19
20 SessionID::id_type SessionID::IdForWindowContainingTab(const TabContents* tab) { 20 SessionID::id_type SessionID::IdForWindowContainingTab(const TabContents* tab) {
21 return tab ? tab->restore_tab_helper()->window_id().id() : -1; 21 return tab ? tab->session_tab_helper()->window_id().id() : -1;
22 } 22 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/background_printing_manager.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698