OLD | NEW |
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" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "google_apis/google_api_keys.h" | 48 #include "google_apis/google_api_keys.h" |
49 #include "grit/browser_resources.h" | 49 #include "grit/browser_resources.h" |
50 #include "net/base/escape.h" | 50 #include "net/base/escape.h" |
51 #include "net/base/load_flags.h" | 51 #include "net/base/load_flags.h" |
52 #include "net/base/url_util.h" | 52 #include "net/base/url_util.h" |
53 #include "net/url_request/url_fetcher.h" | 53 #include "net/url_request/url_fetcher.h" |
54 #include "net/url_request/url_request_status.h" | 54 #include "net/url_request/url_request_status.h" |
55 #include "ui/base/resource/resource_bundle.h" | 55 #include "ui/base/resource/resource_bundle.h" |
56 | 56 |
57 #ifdef FILE_MANAGER_EXTENSION | 57 #ifdef FILE_MANAGER_EXTENSION |
58 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 58 #include "chrome/browser/chromeos/extensions/file_manager/file_manager_util.h" |
59 #include "extensions/common/constants.h" | 59 #include "extensions/common/constants.h" |
60 #endif | 60 #endif |
61 | 61 |
62 using content::NavigationController; | 62 using content::NavigationController; |
63 using content::NavigationEntry; | 63 using content::NavigationEntry; |
64 using content::WebContents; | 64 using content::WebContents; |
65 | 65 |
66 namespace { | 66 namespace { |
67 | 67 |
68 // The default list of languages the Google translation server supports. | 68 // The default list of languages the Google translation server supports. |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 // list or not at all if no such candidate exists | 869 // list or not at all if no such candidate exists |
870 std::vector<std::string>::iterator iter; | 870 std::vector<std::string>::iterator iter; |
871 for (iter = accept_langs_list.begin(); | 871 for (iter = accept_langs_list.begin(); |
872 iter != accept_langs_list.end(); ++iter) { | 872 iter != accept_langs_list.end(); ++iter) { |
873 std::string lang_code = GetLanguageCode(*iter); | 873 std::string lang_code = GetLanguageCode(*iter); |
874 if (IsSupportedLanguage(lang_code)) | 874 if (IsSupportedLanguage(lang_code)) |
875 return lang_code; | 875 return lang_code; |
876 } | 876 } |
877 return std::string(); | 877 return std::string(); |
878 } | 878 } |
OLD | NEW |