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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 739033003: Support content scheme uri for Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moving content:// protocol handler to content/browser/android Created 6 years 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
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/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #if defined(ENABLE_MANAGED_USERS) 105 #if defined(ENABLE_MANAGED_USERS)
106 #include "chrome/browser/supervised_user/supervised_user_service.h" 106 #include "chrome/browser/supervised_user/supervised_user_service.h"
107 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 107 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
108 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" 108 #include "chrome/browser/supervised_user/supervised_user_url_filter.h"
109 #endif 109 #endif
110 110
111 #if defined(OS_ANDROID) 111 #if defined(OS_ANDROID)
112 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 112 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
113 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 113 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
114 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h" 114 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h"
115 #include "content/public/browser/android/content_protocol_handler.h"
115 #endif // defined(OS_ANDROID) 116 #endif // defined(OS_ANDROID)
116 117
117 #if defined(OS_CHROMEOS) 118 #if defined(OS_CHROMEOS)
118 #include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h" 119 #include "chrome/browser/chromeos/fileapi/external_file_protocol_handler.h"
119 #include "chrome/browser/chromeos/login/startup_utils.h" 120 #include "chrome/browser/chromeos/login/startup_utils.h"
120 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" 121 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h"
121 #include "chrome/browser/chromeos/net/client_cert_filter_chromeos.h" 122 #include "chrome/browser/chromeos/net/client_cert_filter_chromeos.h"
122 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 123 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
123 #include "chrome/browser/chromeos/policy/policy_cert_service.h" 124 #include "chrome/browser/chromeos/policy/policy_cert_service.h"
124 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" 125 #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 url::kDataScheme, new net::DataProtocolHandler()); 1146 url::kDataScheme, new net::DataProtocolHandler());
1146 DCHECK(set_protocol); 1147 DCHECK(set_protocol);
1147 #if defined(OS_CHROMEOS) 1148 #if defined(OS_CHROMEOS)
1148 if (profile_params_) { 1149 if (profile_params_) {
1149 set_protocol = job_factory->SetProtocolHandler( 1150 set_protocol = job_factory->SetProtocolHandler(
1150 content::kExternalFileScheme, 1151 content::kExternalFileScheme,
1151 new chromeos::ExternalFileProtocolHandler(profile_params_->profile)); 1152 new chromeos::ExternalFileProtocolHandler(profile_params_->profile));
1152 DCHECK(set_protocol); 1153 DCHECK(set_protocol);
1153 } 1154 }
1154 #endif // defined(OS_CHROMEOS) 1155 #endif // defined(OS_CHROMEOS)
1156 #if defined(OS_ANDROID)
1157 set_protocol = job_factory->SetProtocolHandler(
1158 url::kContentScheme,
1159 new content::ContentProtocolHandler::Create(
1160 content::BrowserThread::GetBlockingPool()->
1161 GetTaskRunnerWithShutdownBehavior(
1162 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
1163 #endif
1155 1164
1156 job_factory->SetProtocolHandler( 1165 job_factory->SetProtocolHandler(
1157 url::kAboutScheme, new chrome_browser_net::AboutProtocolHandler()); 1166 url::kAboutScheme, new chrome_browser_net::AboutProtocolHandler());
1158 #if !defined(DISABLE_FTP_SUPPORT) 1167 #if !defined(DISABLE_FTP_SUPPORT)
1159 DCHECK(ftp_transaction_factory); 1168 DCHECK(ftp_transaction_factory);
1160 job_factory->SetProtocolHandler( 1169 job_factory->SetProtocolHandler(
1161 url::kFtpScheme, 1170 url::kFtpScheme,
1162 new net::FtpProtocolHandler(ftp_transaction_factory)); 1171 new net::FtpProtocolHandler(ftp_transaction_factory));
1163 #endif // !defined(DISABLE_FTP_SUPPORT) 1172 #endif // !defined(DISABLE_FTP_SUPPORT)
1164 1173
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 void ProfileIOData::SetCookieSettingsForTesting( 1297 void ProfileIOData::SetCookieSettingsForTesting(
1289 CookieSettings* cookie_settings) { 1298 CookieSettings* cookie_settings) {
1290 DCHECK(!cookie_settings_.get()); 1299 DCHECK(!cookie_settings_.get());
1291 cookie_settings_ = cookie_settings; 1300 cookie_settings_ = cookie_settings;
1292 } 1301 }
1293 1302
1294 void ProfileIOData::set_signin_names_for_testing( 1303 void ProfileIOData::set_signin_names_for_testing(
1295 SigninNamesOnIOThread* signin_names) { 1304 SigninNamesOnIOThread* signin_names) {
1296 signin_names_.reset(signin_names); 1305 signin_names_.reset(signin_names);
1297 } 1306 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698