| 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_infobar_delegate.h" | 5 #include "components/translate/core/browser/translate_infobar_delegate.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/string_compare.h" | 9 #include "base/i18n/string_compare.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 const int kNeverTranslateMinCount = 3; | 42 const int kNeverTranslateMinCount = 3; |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 const size_t TranslateInfoBarDelegate::kNoIndex = TranslateUIDelegate::kNoIndex; | 47 const size_t TranslateInfoBarDelegate::kNoIndex = TranslateUIDelegate::kNoIndex; |
| 48 | 48 |
| 49 TranslateInfoBarDelegate::~TranslateInfoBarDelegate() { | 49 TranslateInfoBarDelegate::~TranslateInfoBarDelegate() { |
| 50 } | 50 } |
| 51 | 51 |
| 52 std::string TranslateInfoBarDelegate::GetIdentifier() const { |
| 53 return "TranslateInfoBarDelegate"; |
| 54 } |
| 55 |
| 52 // static | 56 // static |
| 53 void TranslateInfoBarDelegate::Create( | 57 void TranslateInfoBarDelegate::Create( |
| 54 bool replace_existing_infobar, | 58 bool replace_existing_infobar, |
| 55 const base::WeakPtr<TranslateManager>& translate_manager, | 59 const base::WeakPtr<TranslateManager>& translate_manager, |
| 56 infobars::InfoBarManager* infobar_manager, | 60 infobars::InfoBarManager* infobar_manager, |
| 57 bool is_off_the_record, | 61 bool is_off_the_record, |
| 58 translate::TranslateStep step, | 62 translate::TranslateStep step, |
| 59 const std::string& original_language, | 63 const std::string& original_language, |
| 60 const std::string& target_language, | 64 const std::string& target_language, |
| 61 TranslateErrors::Type error_type, | 65 TranslateErrors::Type error_type, |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 TranslationDeclined(); | 368 TranslationDeclined(); |
| 365 UMA_HISTOGRAM_BOOLEAN("Translate.DeclineTranslateCloseInfobar", true); | 369 UMA_HISTOGRAM_BOOLEAN("Translate.DeclineTranslateCloseInfobar", true); |
| 366 } | 370 } |
| 367 | 371 |
| 368 TranslateInfoBarDelegate* | 372 TranslateInfoBarDelegate* |
| 369 TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() { | 373 TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() { |
| 370 return this; | 374 return this; |
| 371 } | 375 } |
| 372 | 376 |
| 373 } // namespace translate | 377 } // namespace translate |
| OLD | NEW |