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/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // - Chrome OS file manager extension | 113 // - Chrome OS file manager extension |
114 // - an FTP page (as FTP pages tend to have long lists of filenames that may | 114 // - an FTP page (as FTP pages tend to have long lists of filenames that may |
115 // confuse the CLD) | 115 // confuse the CLD) |
116 return !url.is_empty() && | 116 return !url.is_empty() && |
117 !url.SchemeIs(chrome::kChromeUIScheme) && | 117 !url.SchemeIs(chrome::kChromeUIScheme) && |
118 !url.SchemeIs(chrome::kChromeDevToolsScheme) && | 118 !url.SchemeIs(chrome::kChromeDevToolsScheme) && |
119 #ifdef FILE_MANAGER_EXTENSION | 119 #ifdef FILE_MANAGER_EXTENSION |
120 !(url.SchemeIs(extensions::kExtensionScheme) && | 120 !(url.SchemeIs(extensions::kExtensionScheme) && |
121 url.DomainIs(file_manager::kFileManagerAppId)) && | 121 url.DomainIs(file_manager::kFileManagerAppId)) && |
122 #endif | 122 #endif |
123 !url.SchemeIs(chrome::kFtpScheme); | 123 !url.SchemeIs(content::kFtpScheme); |
124 } | 124 } |
125 | 125 |
126 // static | 126 // static |
127 void TranslateManager::GetSupportedLanguages( | 127 void TranslateManager::GetSupportedLanguages( |
128 std::vector<std::string>* languages) { | 128 std::vector<std::string>* languages) { |
129 if (GetInstance()->language_list_.get()) { | 129 if (GetInstance()->language_list_.get()) { |
130 GetInstance()->language_list_->GetSupportedLanguages(languages); | 130 GetInstance()->language_list_->GetSupportedLanguages(languages); |
131 return; | 131 return; |
132 } | 132 } |
133 NOTREACHED(); | 133 NOTREACHED(); |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 // so we are more aggressive about showing the shortcut to never translate. | 795 // so we are more aggressive about showing the shortcut to never translate. |
796 #if defined(OS_ANDROID) | 796 #if defined(OS_ANDROID) |
797 config.never_translate_min_count = 1; | 797 config.never_translate_min_count = 1; |
798 #else | 798 #else |
799 config.never_translate_min_count = 3; | 799 config.never_translate_min_count = 3; |
800 #endif // defined(OS_ANDROID) | 800 #endif // defined(OS_ANDROID) |
801 | 801 |
802 config.always_translate_min_count = 3; | 802 config.always_translate_min_count = 3; |
803 return config; | 803 return config; |
804 } | 804 } |
OLD | NEW |