| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/bookmarks/bookmark_table_model.h" | 5 #include "chrome/browser/bookmarks/bookmark_table_model.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| 11 #include "app/table_model_observer.h" | 11 #include "app/table_model_observer.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 base::i18n::AdjustStringForLocaleDirection(title, &title); | 318 base::i18n::AdjustStringForLocaleDirection(title, &title); |
| 319 return title; | 319 return title; |
| 320 } | 320 } |
| 321 | 321 |
| 322 case IDS_BOOKMARK_TABLE_URL: { | 322 case IDS_BOOKMARK_TABLE_URL: { |
| 323 if (!node->is_url()) | 323 if (!node->is_url()) |
| 324 return std::wstring(); | 324 return std::wstring(); |
| 325 std::wstring languages = model_ && model_->profile() | 325 std::wstring languages = model_ && model_->profile() |
| 326 ? model_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages) | 326 ? model_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages) |
| 327 : std::wstring(); | 327 : std::wstring(); |
| 328 std::wstring url_text = net::FormatUrl(node->GetURL(), languages, false, | 328 std::wstring url_text = net::FormatUrl(node->GetURL(), languages, |
| 329 UnescapeRule::SPACES, NULL, NULL, NULL); | 329 net::kFormatUrlOmitAll, UnescapeRule::SPACES, NULL, NULL, NULL); |
| 330 if (base::i18n::IsRTL()) | 330 if (base::i18n::IsRTL()) |
| 331 base::i18n::WrapStringWithLTRFormatting(&url_text); | 331 base::i18n::WrapStringWithLTRFormatting(&url_text); |
| 332 return url_text; | 332 return url_text; |
| 333 } | 333 } |
| 334 | 334 |
| 335 case IDS_BOOKMARK_TABLE_PATH: { | 335 case IDS_BOOKMARK_TABLE_PATH: { |
| 336 std::wstring path; | 336 std::wstring path; |
| 337 BuildPath(node->GetParent(), &path); | 337 BuildPath(node->GetParent(), &path); |
| 338 // Force path to have LTR directionality. The whole path (but not every | 338 // Force path to have LTR directionality. The whole path (but not every |
| 339 // single path component) is marked with LRE-PDF. For example, | 339 // single path component) is marked with LRE-PDF. For example, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 return; | 403 return; |
| 404 } | 404 } |
| 405 if (node == model()->other_node()) { | 405 if (node == model()->other_node()) { |
| 406 *path = l10n_util::GetString(IDS_BOOKMARK_TABLE_OTHER_BOOKMARKS_PATH); | 406 *path = l10n_util::GetString(IDS_BOOKMARK_TABLE_OTHER_BOOKMARKS_PATH); |
| 407 return; | 407 return; |
| 408 } | 408 } |
| 409 BuildPath(node->GetParent(), path); | 409 BuildPath(node->GetParent(), path); |
| 410 path->append(l10n_util::GetString(IDS_BOOKMARK_TABLE_PATH_SEPARATOR)); | 410 path->append(l10n_util::GetString(IDS_BOOKMARK_TABLE_PATH_SEPARATOR)); |
| 411 path->append(node->GetTitle()); | 411 path->append(node->GetTitle()); |
| 412 } | 412 } |
| OLD | NEW |