OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/navigation_entry.h" | 5 #include "chrome/browser/navigation_entry.h" |
6 | 6 |
7 #include "chrome/common/resource_bundle.h" | 7 #include "chrome/common/resource_bundle.h" |
8 | 8 |
9 // Use this to get a new unique ID for a NavigationEntry during construction. | 9 // Use this to get a new unique ID for a NavigationEntry during construction. |
10 // The returned ID is guaranteed to be nonzero (which is the "no ID" indicator). | 10 // The returned ID is guaranteed to be nonzero (which is the "no ID" indicator). |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 tab_type_(type), | 47 tab_type_(type), |
48 site_instance_(instance), | 48 site_instance_(instance), |
49 page_type_(NORMAL_PAGE), | 49 page_type_(NORMAL_PAGE), |
50 url_(url), | 50 url_(url), |
51 title_(title), | 51 title_(title), |
52 page_id_(page_id), | 52 page_id_(page_id), |
53 transition_type_(transition_type), | 53 transition_type_(transition_type), |
54 has_post_data_(false), | 54 has_post_data_(false), |
55 restored_(false) { | 55 restored_(false) { |
56 } | 56 } |
| 57 |
| 58 const std::wstring& NavigationEntry::GetTitleForDisplay() { |
| 59 if (title_.empty()) |
| 60 return url_as_string_; |
| 61 return title_; |
| 62 } |
OLD | NEW |