Chromium Code Reviews| 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 30 matching lines...) Expand all Loading... | |
| 41 navigation.referrer_ = entry.GetReferrer(); | 41 navigation.referrer_ = entry.GetReferrer(); |
| 42 navigation.virtual_url_ = entry.GetVirtualURL(); | 42 navigation.virtual_url_ = entry.GetVirtualURL(); |
| 43 navigation.title_ = entry.GetTitle(); | 43 navigation.title_ = entry.GetTitle(); |
| 44 navigation.content_state_ = entry.GetContentState(); | 44 navigation.content_state_ = entry.GetContentState(); |
| 45 navigation.transition_type_ = entry.GetTransitionType(); | 45 navigation.transition_type_ = entry.GetTransitionType(); |
| 46 navigation.has_post_data_ = entry.GetHasPostData(); | 46 navigation.has_post_data_ = entry.GetHasPostData(); |
| 47 navigation.post_id_ = entry.GetPostID(); | 47 navigation.post_id_ = entry.GetPostID(); |
| 48 navigation.original_request_url_ = entry.GetOriginalRequestURL(); | 48 navigation.original_request_url_ = entry.GetOriginalRequestURL(); |
| 49 navigation.is_overriding_user_agent_ = entry.GetIsOverridingUserAgent(); | 49 navigation.is_overriding_user_agent_ = entry.GetIsOverridingUserAgent(); |
| 50 navigation.timestamp_ = entry.GetTimestamp(); | 50 navigation.timestamp_ = entry.GetTimestamp(); |
| 51 // If you want to navigate a named frame in Chrome, you will first need to | |
| 52 // add support for persisting it. It is currently only used for layout tests. | |
| 53 DCHECK(entry.GetFrameToNavigate().empty()); | |
|
Charlie Reis
2013/01/23 18:38:17
Please make this a CHECK. It could be a security
jochen (gone - plz use gerrit)
2013/01/23 19:52:45
Done.
| |
| 51 return navigation; | 54 return navigation; |
| 52 } | 55 } |
| 53 | 56 |
| 54 TabNavigation TabNavigation::FromSyncData( | 57 TabNavigation TabNavigation::FromSyncData( |
| 55 int index, | 58 int index, |
| 56 const sync_pb::TabNavigation& sync_data) { | 59 const sync_pb::TabNavigation& sync_data) { |
| 57 TabNavigation navigation; | 60 TabNavigation navigation; |
| 58 navigation.index_ = index; | 61 navigation.index_ = index; |
| 59 navigation.unique_id_ = sync_data.unique_id(); | 62 navigation.unique_id_ = sync_data.unique_id(); |
| 60 navigation.referrer_ = | 63 navigation.referrer_ = |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 SessionWindow::SessionWindow() | 489 SessionWindow::SessionWindow() |
| 487 : selected_tab_index(-1), | 490 : selected_tab_index(-1), |
| 488 type(Browser::TYPE_TABBED), | 491 type(Browser::TYPE_TABBED), |
| 489 is_constrained(true), | 492 is_constrained(true), |
| 490 show_state(ui::SHOW_STATE_DEFAULT) { | 493 show_state(ui::SHOW_STATE_DEFAULT) { |
| 491 } | 494 } |
| 492 | 495 |
| 493 SessionWindow::~SessionWindow() { | 496 SessionWindow::~SessionWindow() { |
| 494 STLDeleteElements(&tabs); | 497 STLDeleteElements(&tabs); |
| 495 } | 498 } |
| OLD | NEW |