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

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: addressing comments Created 6 years, 1 month 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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 url::kDataScheme, new net::DataProtocolHandler()); 1145 url::kDataScheme, new net::DataProtocolHandler());
1146 DCHECK(set_protocol); 1146 DCHECK(set_protocol);
1147 #if defined(OS_CHROMEOS) 1147 #if defined(OS_CHROMEOS)
1148 if (profile_params_) { 1148 if (profile_params_) {
1149 set_protocol = job_factory->SetProtocolHandler( 1149 set_protocol = job_factory->SetProtocolHandler(
1150 content::kExternalFileScheme, 1150 content::kExternalFileScheme,
1151 new chromeos::ExternalFileProtocolHandler(profile_params_->profile)); 1151 new chromeos::ExternalFileProtocolHandler(profile_params_->profile));
1152 DCHECK(set_protocol); 1152 DCHECK(set_protocol);
1153 } 1153 }
1154 #endif // defined(OS_CHROMEOS) 1154 #endif // defined(OS_CHROMEOS)
1155 #if defined(OS_ANDROID)
1156 set_protocol = job_factory->SetProtocolHandler(
1157 url::kContentScheme,
1158 new net::FileProtocolHandler(
1159 content::BrowserThread::GetBlockingPool()->
1160 GetTaskRunnerWithShutdownBehavior(
1161 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
1162 #endif
1155 1163
1156 job_factory->SetProtocolHandler( 1164 job_factory->SetProtocolHandler(
1157 url::kAboutScheme, new chrome_browser_net::AboutProtocolHandler()); 1165 url::kAboutScheme, new chrome_browser_net::AboutProtocolHandler());
1158 #if !defined(DISABLE_FTP_SUPPORT) 1166 #if !defined(DISABLE_FTP_SUPPORT)
1159 DCHECK(ftp_transaction_factory); 1167 DCHECK(ftp_transaction_factory);
1160 job_factory->SetProtocolHandler( 1168 job_factory->SetProtocolHandler(
1161 url::kFtpScheme, 1169 url::kFtpScheme,
1162 new net::FtpProtocolHandler(ftp_transaction_factory)); 1170 new net::FtpProtocolHandler(ftp_transaction_factory));
1163 #endif // !defined(DISABLE_FTP_SUPPORT) 1171 #endif // !defined(DISABLE_FTP_SUPPORT)
1164 1172
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 void ProfileIOData::SetCookieSettingsForTesting( 1296 void ProfileIOData::SetCookieSettingsForTesting(
1289 CookieSettings* cookie_settings) { 1297 CookieSettings* cookie_settings) {
1290 DCHECK(!cookie_settings_.get()); 1298 DCHECK(!cookie_settings_.get());
1291 cookie_settings_ = cookie_settings; 1299 cookie_settings_ = cookie_settings;
1292 } 1300 }
1293 1301
1294 void ProfileIOData::set_signin_names_for_testing( 1302 void ProfileIOData::set_signin_names_for_testing(
1295 SigninNamesOnIOThread* signin_names) { 1303 SigninNamesOnIOThread* signin_names) {
1296 signin_names_.reset(signin_names); 1304 signin_names_.reset(signin_names);
1297 } 1305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698