| 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 "components/sessions/core/tab_restore_service.h" | 5 #include "components/sessions/core/tab_restore_service.h" |
| 6 | 6 |
| 7 namespace sessions { | 7 namespace sessions { |
| 8 | 8 |
| 9 // TimeFactory----------------------------------------------------------------- | 9 // TimeFactory----------------------------------------------------------------- |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 TabRestoreService::Tab::Tab() | 32 TabRestoreService::Tab::Tab() |
| 33 : Entry(TAB), | 33 : Entry(TAB), |
| 34 current_navigation_index(-1), | 34 current_navigation_index(-1), |
| 35 browser_id(0), | 35 browser_id(0), |
| 36 tabstrip_index(-1), | 36 tabstrip_index(-1), |
| 37 pinned(false) { | 37 pinned(false) { |
| 38 } | 38 } |
| 39 | 39 |
| 40 TabRestoreService::Tab::Tab(const TabRestoreService::Tab& tab) | 40 TabRestoreService::Tab::Tab(const TabRestoreService::Tab& tab) |
| 41 : Entry(TAB), | 41 : Entry(tab), |
| 42 navigations(tab.navigations), | 42 navigations(tab.navigations), |
| 43 current_navigation_index(tab.current_navigation_index), | 43 current_navigation_index(tab.current_navigation_index), |
| 44 browser_id(tab.browser_id), | 44 browser_id(tab.browser_id), |
| 45 tabstrip_index(tab.tabstrip_index), | 45 tabstrip_index(tab.tabstrip_index), |
| 46 pinned(tab.pinned), | 46 pinned(tab.pinned), |
| 47 extension_app_id(tab.extension_app_id), | 47 extension_app_id(tab.extension_app_id), |
| 48 user_agent_override(tab.user_agent_override) { | 48 user_agent_override(tab.user_agent_override) { |
| 49 if (tab.platform_data) | 49 if (tab.platform_data) |
| 50 platform_data = tab.platform_data->Clone(); | 50 platform_data = tab.platform_data->Clone(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 TabRestoreService::Tab::~Tab() { | 53 TabRestoreService::Tab::~Tab() { |
| 54 } | 54 } |
| 55 | 55 |
| 56 TabRestoreService::Tab& TabRestoreService::Tab::operator=( | 56 TabRestoreService::Tab& TabRestoreService::Tab::operator=( |
| 57 const TabRestoreService::Tab& tab) { | 57 const TabRestoreService::Tab& tab) { |
| 58 id = tab.id; |
| 59 type = tab.type; |
| 60 timestamp = tab.timestamp; |
| 61 from_last_session = tab.from_last_session; |
| 58 navigations = tab.navigations; | 62 navigations = tab.navigations; |
| 59 current_navigation_index = tab.current_navigation_index; | 63 current_navigation_index = tab.current_navigation_index; |
| 60 browser_id = tab.browser_id; | 64 browser_id = tab.browser_id; |
| 61 tabstrip_index = tab.tabstrip_index; | 65 tabstrip_index = tab.tabstrip_index; |
| 62 pinned = tab.pinned; | 66 pinned = tab.pinned; |
| 63 extension_app_id = tab.extension_app_id; | 67 extension_app_id = tab.extension_app_id; |
| 64 user_agent_override = tab.user_agent_override; | 68 user_agent_override = tab.user_agent_override; |
| 65 | 69 |
| 66 if (tab.platform_data) | 70 if (tab.platform_data) |
| 67 platform_data = tab.platform_data->Clone(); | 71 platform_data = tab.platform_data->Clone(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 81 | 85 |
| 82 TabRestoreService::~TabRestoreService() { | 86 TabRestoreService::~TabRestoreService() { |
| 83 } | 87 } |
| 84 | 88 |
| 85 // PlatformSpecificTabData | 89 // PlatformSpecificTabData |
| 86 // ------------------------------------------------------ | 90 // ------------------------------------------------------ |
| 87 | 91 |
| 88 PlatformSpecificTabData::~PlatformSpecificTabData() {} | 92 PlatformSpecificTabData::~PlatformSpecificTabData() {} |
| 89 | 93 |
| 90 } // namespace sessions | 94 } // namespace sessions |
| OLD | NEW |