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

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

Issue 15055003: Do not submit: high level overview patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build. Created 7 years, 7 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_types.h" 5 #include "chrome/browser/sessions/session_types.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/browser/sessions/session_command.h" 9 #include "chrome/browser/sessions/session_command.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 11
12 using sessions::SerializedNavigationEntry; 12 using sessions::SerializedNavigationEntry;
13 13
14 // SessionTab ----------------------------------------------------------------- 14 // SessionTab -----------------------------------------------------------------
15 15
16 SessionTab::SessionTab() 16 SessionTab::SessionTab()
17 : tab_visual_index(-1), 17 : tab_visual_index(-1),
18 current_navigation_index(-1), 18 current_navigation_index(-1),
19 pinned(false) { 19 pinned(false),
20 } 20 sync_session_id(-1) {}
21 21
22 SessionTab::~SessionTab() { 22 SessionTab::~SessionTab() {
23 } 23 }
24 24
25 void SessionTab::SetFromSyncData(const sync_pb::SessionTab& sync_data, 25 void SessionTab::SetFromSyncData(const sync_pb::SessionTab& sync_data,
26 base::Time timestamp) { 26 base::Time timestamp) {
27 window_id.set_id(sync_data.window_id()); 27 window_id.set_id(sync_data.window_id());
28 tab_id.set_id(sync_data.tab_id()); 28 tab_id.set_id(sync_data.tab_id());
29 tab_visual_index = sync_data.tab_visual_index(); 29 tab_visual_index = sync_data.tab_visual_index();
30 current_navigation_index = sync_data.current_navigation_index(); 30 current_navigation_index = sync_data.current_navigation_index();
(...skipping 29 matching lines...) Expand all
60 SessionWindow::SessionWindow() 60 SessionWindow::SessionWindow()
61 : selected_tab_index(-1), 61 : selected_tab_index(-1),
62 type(Browser::TYPE_TABBED), 62 type(Browser::TYPE_TABBED),
63 is_constrained(true), 63 is_constrained(true),
64 show_state(ui::SHOW_STATE_DEFAULT) { 64 show_state(ui::SHOW_STATE_DEFAULT) {
65 } 65 }
66 66
67 SessionWindow::~SessionWindow() { 67 SessionWindow::~SessionWindow() {
68 STLDeleteElements(&tabs); 68 STLDeleteElements(&tabs);
69 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698