| OLD | NEW |
| 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/pickle.h" | 8 #include "base/pickle.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 sync_data.set_navigation_from_address_bar( | 407 sync_data.set_navigation_from_address_bar( |
| 408 (transition_type_ & content::PAGE_TRANSITION_FROM_ADDRESS_BAR) != 0); | 408 (transition_type_ & content::PAGE_TRANSITION_FROM_ADDRESS_BAR) != 0); |
| 409 sync_data.set_navigation_home_page( | 409 sync_data.set_navigation_home_page( |
| 410 (transition_type_ & content::PAGE_TRANSITION_HOME_PAGE) != 0); | 410 (transition_type_ & content::PAGE_TRANSITION_HOME_PAGE) != 0); |
| 411 sync_data.set_navigation_chain_start( | 411 sync_data.set_navigation_chain_start( |
| 412 (transition_type_ & content::PAGE_TRANSITION_CHAIN_START) != 0); | 412 (transition_type_ & content::PAGE_TRANSITION_CHAIN_START) != 0); |
| 413 sync_data.set_navigation_chain_end( | 413 sync_data.set_navigation_chain_end( |
| 414 (transition_type_ & content::PAGE_TRANSITION_CHAIN_END) != 0); | 414 (transition_type_ & content::PAGE_TRANSITION_CHAIN_END) != 0); |
| 415 | 415 |
| 416 sync_data.set_unique_id(unique_id_); | 416 sync_data.set_unique_id(unique_id_); |
| 417 // TODO(akalin): Don't lose resolution, i.e. define a new timestamp | 417 sync_data.set_timestamp_deprecated(syncer::TimeToProtoTime(timestamp_)); |
| 418 // field with microsecond resolution and use that. | 418 sync_data.set_local_timestamp(timestamp_.ToInternalValue()); |
| 419 sync_data.set_timestamp(syncer::TimeToProtoTime(timestamp_)); | |
| 420 | 419 |
| 421 return sync_data; | 420 return sync_data; |
| 422 } | 421 } |
| 423 | 422 |
| 424 // static | 423 // static |
| 425 std::vector<NavigationEntry*> | 424 std::vector<NavigationEntry*> |
| 426 TabNavigation::CreateNavigationEntriesFromTabNavigations( | 425 TabNavigation::CreateNavigationEntriesFromTabNavigations( |
| 427 const std::vector<TabNavigation>& navigations, | 426 const std::vector<TabNavigation>& navigations, |
| 428 content::BrowserContext* browser_context) { | 427 content::BrowserContext* browser_context) { |
| 429 int page_id = 0; | 428 int page_id = 0; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 SessionWindow::SessionWindow() | 485 SessionWindow::SessionWindow() |
| 487 : selected_tab_index(-1), | 486 : selected_tab_index(-1), |
| 488 type(Browser::TYPE_TABBED), | 487 type(Browser::TYPE_TABBED), |
| 489 is_constrained(true), | 488 is_constrained(true), |
| 490 show_state(ui::SHOW_STATE_DEFAULT) { | 489 show_state(ui::SHOW_STATE_DEFAULT) { |
| 491 } | 490 } |
| 492 | 491 |
| 493 SessionWindow::~SessionWindow() { | 492 SessionWindow::~SessionWindow() { |
| 494 STLDeleteElements(&tabs); | 493 STLDeleteElements(&tabs); |
| 495 } | 494 } |
| OLD | NEW |