| 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/dom_ui/dom_ui.h" | 5 #include "chrome/browser/dom_ui/dom_ui.h" |
| 6 | 6 |
| 7 #include "base/json_reader.h" | 7 #include "base/json_reader.h" |
| 8 #include "base/json_writer.h" | 8 #include "base/json_writer.h" |
| 9 #include "base/string_util.h" |
| 9 #include "base/values.h" | 10 #include "base/values.h" |
| 10 #include "chrome/common/l10n_util.h" | 11 #include "chrome/common/l10n_util.h" |
| 11 | 12 |
| 12 /////////////////////////////////////////////////////////////////////////////// | 13 /////////////////////////////////////////////////////////////////////////////// |
| 13 // DOMMessageHandler | 14 // DOMMessageHandler |
| 14 | 15 |
| 15 DOMUI::DOMUI(DOMUIContents* contents) : contents_(contents) { | 16 DOMUI::DOMUI(DOMUIContents* contents) : contents_(contents) { |
| 16 } | 17 } |
| 17 | 18 |
| 18 DOMUI::~DOMUI() { | 19 DOMUI::~DOMUI() { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 if (using_url_as_the_title) { | 117 if (using_url_as_the_title) { |
| 117 l10n_util::WrapStringWithLTRFormatting(&title_to_set); | 118 l10n_util::WrapStringWithLTRFormatting(&title_to_set); |
| 118 } else { | 119 } else { |
| 119 bool success = | 120 bool success = |
| 120 l10n_util::AdjustStringForLocaleDirection(title, &title_to_set); | 121 l10n_util::AdjustStringForLocaleDirection(title, &title_to_set); |
| 121 DCHECK(success ? (title != title_to_set) : (title == title_to_set)); | 122 DCHECK(success ? (title != title_to_set) : (title == title_to_set)); |
| 122 } | 123 } |
| 123 } | 124 } |
| 124 dictionary->SetString(L"title", title_to_set); | 125 dictionary->SetString(L"title", title_to_set); |
| 125 } | 126 } |
| OLD | NEW |