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

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

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 7 #include "base/bind.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/json/json_reader.h" 10 #include "base/json/json_reader.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/prefs/pref_service.h"
14 #include "base/string_split.h" 15 #include "base/string_split.h"
15 #include "base/string_util.h" 16 #include "base/string_util.h"
16 #include "base/stringprintf.h" 17 #include "base/stringprintf.h"
17 #include "base/values.h" 18 #include "base/values.h"
18 #include "chrome/browser/api/infobars/infobar_service.h" 19 #include "chrome/browser/api/infobars/infobar_service.h"
19 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/prefs/pref_service.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/tab_contents/language_state.h" 22 #include "chrome/browser/tab_contents/language_state.h"
23 #include "chrome/browser/tab_contents/tab_util.h" 23 #include "chrome/browser/tab_contents/tab_util.h"
24 #include "chrome/browser/translate/page_translated_details.h" 24 #include "chrome/browser/translate/page_translated_details.h"
25 #include "chrome/browser/translate/translate_infobar_delegate.h" 25 #include "chrome/browser/translate/translate_infobar_delegate.h"
26 #include "chrome/browser/translate/translate_prefs.h" 26 #include "chrome/browser/translate/translate_prefs.h"
27 #include "chrome/browser/translate/translate_tab_helper.h" 27 #include "chrome/browser/translate/translate_tab_helper.h"
28 #include "chrome/browser/ui/browser.h" 28 #include "chrome/browser/ui/browser.h"
29 #include "chrome/browser/ui/browser_finder.h" 29 #include "chrome/browser/ui/browser_finder.h"
30 #include "chrome/browser/ui/browser_tabstrip.h" 30 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 // list or not at all if no such candidate exists 820 // list or not at all if no such candidate exists
821 std::vector<std::string>::iterator iter; 821 std::vector<std::string>::iterator iter;
822 for (iter = accept_langs_list.begin(); 822 for (iter = accept_langs_list.begin();
823 iter != accept_langs_list.end(); ++iter) { 823 iter != accept_langs_list.end(); ++iter) {
824 std::string lang_code = GetLanguageCode(*iter); 824 std::string lang_code = GetLanguageCode(*iter);
825 if (IsSupportedLanguage(lang_code)) 825 if (IsSupportedLanguage(lang_code))
826 return lang_code; 826 return lang_code;
827 } 827 }
828 return std::string(); 828 return std::string();
829 } 829 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_factory.cc ('k') | chrome/browser/translate/translate_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698