OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/translate/core/browser/translate_ui_delegate.h" | 5 #include "components/translate/core/browser/translate_ui_delegate.h" |
6 | 6 |
7 #include "base/i18n/string_compare.h" | 7 #include "base/i18n/string_compare.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "components/translate/core/browser/language_state.h" | 9 #include "components/translate/core/browser/language_state.h" |
10 #include "components/translate/core/browser/translate_client.h" | 10 #include "components/translate/core/browser/translate_client.h" |
11 #include "components/translate/core/browser/translate_download_manager.h" | 11 #include "components/translate/core/browser/translate_download_manager.h" |
12 #include "components/translate/core/browser/translate_driver.h" | 12 #include "components/translate/core/browser/translate_driver.h" |
13 #include "components/translate/core/browser/translate_manager.h" | 13 #include "components/translate/core/browser/translate_manager.h" |
14 #include "components/translate/core/browser/translate_prefs.h" | 14 #include "components/translate/core/browser/translate_prefs.h" |
15 #include "components/translate/core/common/translate_constants.h" | 15 #include "components/translate/core/common/translate_constants.h" |
16 #include "third_party/icu/source/i18n/unicode/coll.h" | 16 #include "third_party/icu/source/i18n/unicode/coll.h" |
17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
18 | 18 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 UMA_HISTOGRAM_BOOLEAN(kAlwaysTranslateLang, true); | 255 UMA_HISTOGRAM_BOOLEAN(kAlwaysTranslateLang, true); |
256 } | 256 } |
257 | 257 |
258 std::string TranslateUIDelegate::GetPageHost() { | 258 std::string TranslateUIDelegate::GetPageHost() { |
259 if (!translate_driver_->HasCurrentPage()) | 259 if (!translate_driver_->HasCurrentPage()) |
260 return std::string(); | 260 return std::string(); |
261 return translate_driver_->GetActiveURL().HostNoBrackets(); | 261 return translate_driver_->GetActiveURL().HostNoBrackets(); |
262 } | 262 } |
263 | 263 |
264 } // namespace translate | 264 } // namespace translate |
OLD | NEW |