| 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/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/translate/translate_manager.h" | |
| 13 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 15 #include "components/translate/core/browser/translate_download_manager.h" | 14 #include "components/translate/core/browser/translate_download_manager.h" |
| 15 #include "components/translate/core/browser/translate_manager.h" |
| 16 #include "content/public/common/url_constants.h" | 16 #include "content/public/common/url_constants.h" |
| 17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 18 | 18 |
| 19 #if defined(OS_CHROMEOS) | 19 #if defined(OS_CHROMEOS) |
| 20 #include "chrome/browser/chromeos/file_manager/app_id.h" | 20 #include "chrome/browser/chromeos/file_manager/app_id.h" |
| 21 #include "extensions/common/constants.h" | 21 #include "extensions/common/constants.h" |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 // The singleton instance of TranslateService. | 25 // The singleton instance of TranslateService. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // - an FTP page (as FTP pages tend to have long lists of filenames that may | 126 // - an FTP page (as FTP pages tend to have long lists of filenames that may |
| 127 // confuse the CLD) | 127 // confuse the CLD) |
| 128 return !url.is_empty() && !url.SchemeIs(content::kChromeUIScheme) && | 128 return !url.is_empty() && !url.SchemeIs(content::kChromeUIScheme) && |
| 129 !url.SchemeIs(content::kChromeDevToolsScheme) && | 129 !url.SchemeIs(content::kChromeDevToolsScheme) && |
| 130 #if defined(OS_CHROMEOS) | 130 #if defined(OS_CHROMEOS) |
| 131 !(url.SchemeIs(extensions::kExtensionScheme) && | 131 !(url.SchemeIs(extensions::kExtensionScheme) && |
| 132 url.DomainIs(file_manager::kFileManagerAppId)) && | 132 url.DomainIs(file_manager::kFileManagerAppId)) && |
| 133 #endif | 133 #endif |
| 134 !url.SchemeIs(content::kFtpScheme); | 134 !url.SchemeIs(content::kFtpScheme); |
| 135 } | 135 } |
| OLD | NEW |