OLD | NEW |
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 "chrome/browser/translate/translate_service.h" | 5 #include "chrome/browser/translate/translate_service.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/prefs/pref_service.h" | |
11 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
12 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
13 #include "build/build_config.h" | 12 #include "build/build_config.h" |
14 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/translate/chrome_translate_client.h" | 14 #include "chrome/browser/translate/chrome_translate_client.h" |
16 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 17 #include "components/prefs/pref_service.h" |
18 #include "components/translate/core/browser/translate_download_manager.h" | 18 #include "components/translate/core/browser/translate_download_manager.h" |
19 #include "components/translate/core/browser/translate_manager.h" | 19 #include "components/translate/core/browser/translate_manager.h" |
20 #include "content/public/common/url_constants.h" | 20 #include "content/public/common/url_constants.h" |
21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
22 | 22 |
23 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
24 #include "chrome/browser/chromeos/file_manager/app_id.h" | 24 #include "chrome/browser/chromeos/file_manager/app_id.h" |
25 #include "extensions/common/constants.h" | 25 #include "extensions/common/constants.h" |
26 #endif | 26 #endif |
27 | 27 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // - an FTP page (as FTP pages tend to have long lists of filenames that may | 131 // - an FTP page (as FTP pages tend to have long lists of filenames that may |
132 // confuse the CLD) | 132 // confuse the CLD) |
133 return !url.is_empty() && !url.SchemeIs(content::kChromeUIScheme) && | 133 return !url.is_empty() && !url.SchemeIs(content::kChromeUIScheme) && |
134 !url.SchemeIs(content::kChromeDevToolsScheme) && | 134 !url.SchemeIs(content::kChromeDevToolsScheme) && |
135 #if defined(OS_CHROMEOS) | 135 #if defined(OS_CHROMEOS) |
136 !(url.SchemeIs(extensions::kExtensionScheme) && | 136 !(url.SchemeIs(extensions::kExtensionScheme) && |
137 url.DomainIs(file_manager::kFileManagerAppId)) && | 137 url.DomainIs(file_manager::kFileManagerAppId)) && |
138 #endif | 138 #endif |
139 !url.SchemeIs(url::kFtpScheme); | 139 !url.SchemeIs(url::kFtpScheme); |
140 } | 140 } |
OLD | NEW |