| 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/tab_contents/navigation_entry.h" | 5 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 6 | 6 |
| 7 #include "app/gfx/text_elider.h" |
| 7 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 8 #include "chrome/browser/tab_contents/navigation_controller.h" | 9 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 9 #include "chrome/common/gfx/text_elider.h" | |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| 11 #include "chrome/common/pref_service.h" | 11 #include "chrome/common/pref_service.h" |
| 12 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
| 13 | 13 |
| 14 // Use this to get a new unique ID for a NavigationEntry during construction. | 14 // Use this to get a new unique ID for a NavigationEntry during construction. |
| 15 // The returned ID is guaranteed to be nonzero (which is the "no ID" indicator). | 15 // The returned ID is guaranteed to be nonzero (which is the "no ID" indicator). |
| 16 static int GetUniqueID() { | 16 static int GetUniqueID() { |
| 17 static int unique_id_counter = 0; | 17 static int unique_id_counter = 0; |
| 18 return ++unique_id_counter; | 18 return ++unique_id_counter; |
| 19 } | 19 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } else if (!url_.is_empty()) { | 84 } else if (!url_.is_empty()) { |
| 85 cached_display_title_ = WideToUTF16Hack(gfx::GetCleanStringFromUrl( | 85 cached_display_title_ = WideToUTF16Hack(gfx::GetCleanStringFromUrl( |
| 86 url_, languages, NULL, NULL)); | 86 url_, languages, NULL, NULL)); |
| 87 } | 87 } |
| 88 return cached_display_title_; | 88 return cached_display_title_; |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool NavigationEntry::IsViewSourceMode() const { | 91 bool NavigationEntry::IsViewSourceMode() const { |
| 92 return display_url_.SchemeIs(chrome::kViewSourceScheme); | 92 return display_url_.SchemeIs(chrome::kViewSourceScheme); |
| 93 } | 93 } |
| OLD | NEW |