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

Side by Side Diff: chrome/browser/translate/translate_manager.cc

Issue 3413026: Landing r60095 to the M7 branch.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/517/src/
Patch Set: Created 10 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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/translate/translate_manager.h" 5 #include "chrome/browser/translate/translate_manager.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/histogram.h" 10 #include "base/histogram.h"
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 GetLanguageCode(g_browser_process->GetApplicationLocale()); 601 GetLanguageCode(g_browser_process->GetApplicationLocale());
602 if (IsSupportedLanguage(target_lang)) 602 if (IsSupportedLanguage(target_lang))
603 return target_lang; 603 return target_lang;
604 return std::string(); 604 return std::string();
605 } 605 }
606 606
607 // static 607 // static
608 TranslateInfoBarDelegate* TranslateManager::GetTranslateInfoBarDelegate( 608 TranslateInfoBarDelegate* TranslateManager::GetTranslateInfoBarDelegate(
609 TabContents* tab) { 609 TabContents* tab) {
610 for (int i = 0; i < tab->infobar_delegate_count(); ++i) { 610 for (int i = 0; i < tab->infobar_delegate_count(); ++i) {
611 InfoBarDelegate* delegate = tab->GetInfoBarDelegateAt(i); 611 TranslateInfoBarDelegate* delegate =
612 if (!delegate) { 612 tab->GetInfoBarDelegateAt(i)->AsTranslateInfoBarDelegate();
613 // Please let jcivelli know if you hit this and how you got to that point. 613 if (delegate)
614 NOTREACHED(); 614 return delegate;
615 continue;
616 }
617 TranslateInfoBarDelegate* translate_delegate =
618 delegate->AsTranslateInfoBarDelegate();
619 if (translate_delegate)
620 return translate_delegate;
621 } 615 }
622 return NULL; 616 return NULL;
623 } 617 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698