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

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

Issue 143733002: Remove FILE_MANAGER_EXTENSION and related configuration. They can be folded back to Chrome OS as co… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove FILE_MANAGER_EXTENSION and related configuration. They can be folded back to Chrome OS as co… Created 6 years, 11 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/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "content/public/browser/notification_details.h" 47 #include "content/public/browser/notification_details.h"
48 #include "content/public/browser/notification_service.h" 48 #include "content/public/browser/notification_service.h"
49 #include "content/public/browser/notification_source.h" 49 #include "content/public/browser/notification_source.h"
50 #include "content/public/browser/notification_types.h" 50 #include "content/public/browser/notification_types.h"
51 #include "content/public/browser/render_process_host.h" 51 #include "content/public/browser/render_process_host.h"
52 #include "content/public/browser/render_view_host.h" 52 #include "content/public/browser/render_view_host.h"
53 #include "content/public/browser/web_contents.h" 53 #include "content/public/browser/web_contents.h"
54 #include "net/base/url_util.h" 54 #include "net/base/url_util.h"
55 #include "net/http/http_status_code.h" 55 #include "net/http/http_status_code.h"
56 56
57 #ifdef FILE_MANAGER_EXTENSION 57 #ifdef OS_CHROMEOS
Lei Zhang 2014/01/21 20:38:01 Change this to #id defined(OS_CHROMEOS) while you
Junichi Uekawa 2014/01/22 01:11:35 Done.
58 #include "chrome/browser/chromeos/file_manager/app_id.h" 58 #include "chrome/browser/chromeos/file_manager/app_id.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
(...skipping 29 matching lines...) Expand all
97 // A URLs is translatable unless it is one of the following: 97 // A URLs is translatable unless it is one of the following:
98 // - empty (can happen for popups created with window.open("")) 98 // - empty (can happen for popups created with window.open(""))
99 // - an internal URL (chrome:// and others) 99 // - an internal URL (chrome:// and others)
100 // - the devtools (which is considered UI) 100 // - the devtools (which is considered UI)
101 // - Chrome OS file manager extension 101 // - Chrome OS file manager extension
102 // - an FTP page (as FTP pages tend to have long lists of filenames that may 102 // - an FTP page (as FTP pages tend to have long lists of filenames that may
103 // confuse the CLD) 103 // confuse the CLD)
104 return !url.is_empty() && 104 return !url.is_empty() &&
105 !url.SchemeIs(chrome::kChromeUIScheme) && 105 !url.SchemeIs(chrome::kChromeUIScheme) &&
106 !url.SchemeIs(chrome::kChromeDevToolsScheme) && 106 !url.SchemeIs(chrome::kChromeDevToolsScheme) &&
107 #ifdef FILE_MANAGER_EXTENSION 107 #ifdef OS_CHROMEOS
108 !(url.SchemeIs(extensions::kExtensionScheme) && 108 !(url.SchemeIs(extensions::kExtensionScheme) &&
109 url.DomainIs(file_manager::kFileManagerAppId)) && 109 url.DomainIs(file_manager::kFileManagerAppId)) &&
110 #endif 110 #endif
111 !url.SchemeIs(content::kFtpScheme); 111 !url.SchemeIs(content::kFtpScheme);
112 } 112 }
113 113
114 // static 114 // static
115 void TranslateManager::GetSupportedLanguages( 115 void TranslateManager::GetSupportedLanguages(
116 std::vector<std::string>* languages) { 116 std::vector<std::string>* languages) {
117 if (GetInstance()->language_list_.get()) { 117 if (GetInstance()->language_list_.get()) {
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 // so we are more aggressive about showing the shortcut to never translate. 810 // so we are more aggressive about showing the shortcut to never translate.
811 #if defined(OS_ANDROID) 811 #if defined(OS_ANDROID)
812 config.never_translate_min_count = 1; 812 config.never_translate_min_count = 1;
813 #else 813 #else
814 config.never_translate_min_count = 3; 814 config.never_translate_min_count = 3;
815 #endif // defined(OS_ANDROID) 815 #endif // defined(OS_ANDROID)
816 816
817 config.always_translate_min_count = 3; 817 config.always_translate_min_count = 3;
818 return config; 818 return config;
819 } 819 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698