Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Side by Side Diff: components/translate/core/browser/translate_infobar_delegate.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a spot. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const int kNeverTranslateMinCount = 3; 43 const int kNeverTranslateMinCount = 3;
44 #endif 44 #endif
45 45
46 } // namespace 46 } // namespace
47 47
48 const size_t TranslateInfoBarDelegate::kNoIndex = TranslateUIDelegate::kNoIndex; 48 const size_t TranslateInfoBarDelegate::kNoIndex = TranslateUIDelegate::kNoIndex;
49 49
50 TranslateInfoBarDelegate::~TranslateInfoBarDelegate() { 50 TranslateInfoBarDelegate::~TranslateInfoBarDelegate() {
51 } 51 }
52 52
53 infobars::InfoBarDelegate::InfoBarIdentifier
54 TranslateInfoBarDelegate::GetIdentifier() const {
55 return TRANSLATE_INFOBAR_DELEGATE_ID;
56 }
57
53 // static 58 // static
54 void TranslateInfoBarDelegate::Create( 59 void TranslateInfoBarDelegate::Create(
55 bool replace_existing_infobar, 60 bool replace_existing_infobar,
56 const base::WeakPtr<TranslateManager>& translate_manager, 61 const base::WeakPtr<TranslateManager>& translate_manager,
57 infobars::InfoBarManager* infobar_manager, 62 infobars::InfoBarManager* infobar_manager,
58 bool is_off_the_record, 63 bool is_off_the_record,
59 translate::TranslateStep step, 64 translate::TranslateStep step,
60 const std::string& original_language, 65 const std::string& original_language,
61 const std::string& target_language, 66 const std::string& target_language,
62 TranslateErrors::Type error_type, 67 TranslateErrors::Type error_type,
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 TranslationDeclined(); 370 TranslationDeclined();
366 UMA_HISTOGRAM_BOOLEAN("Translate.DeclineTranslateCloseInfobar", true); 371 UMA_HISTOGRAM_BOOLEAN("Translate.DeclineTranslateCloseInfobar", true);
367 } 372 }
368 373
369 TranslateInfoBarDelegate* 374 TranslateInfoBarDelegate*
370 TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() { 375 TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() {
371 return this; 376 return this;
372 } 377 }
373 378
374 } // namespace translate 379 } // namespace translate
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698