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

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

Issue 22793018: <webview>: Implement support for package-local chrome-extension:// URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test to verify that a privileged partition can access a local resource Created 7 years, 2 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
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_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.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/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/prefs/pref_member.h" 11 #include "base/prefs/pref_member.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/sequenced_task_runner.h" 13 #include "base/sequenced_task_runner.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/threading/sequenced_worker_pool.h" 16 #include "base/threading/sequenced_worker_pool.h"
17 #include "base/threading/worker_pool.h" 17 #include "base/threading/worker_pool.h"
18 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
20 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 20 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
21 #include "chrome/browser/extensions/extension_protocols.h"
21 #include "chrome/browser/io_thread.h" 22 #include "chrome/browser/io_thread.h"
22 #include "chrome/browser/net/chrome_net_log.h" 23 #include "chrome/browser/net/chrome_net_log.h"
23 #include "chrome/browser/net/chrome_network_delegate.h" 24 #include "chrome/browser/net/chrome_network_delegate.h"
24 #include "chrome/browser/net/connect_interceptor.h" 25 #include "chrome/browser/net/connect_interceptor.h"
25 #include "chrome/browser/net/http_server_properties_manager.h" 26 #include "chrome/browser/net/http_server_properties_manager.h"
26 #include "chrome/browser/net/predictor.h" 27 #include "chrome/browser/net/predictor.h"
27 #include "chrome/browser/net/sqlite_server_bound_cert_store.h" 28 #include "chrome/browser/net/sqlite_server_bound_cert_store.h"
28 #include "chrome/browser/profiles/profile.h" 29 #include "chrome/browser/profiles/profile.h"
29 #include "chrome/common/chrome_constants.h" 30 #include "chrome/common/chrome_constants.h"
30 #include "chrome/common/chrome_switches.h" 31 #include "chrome/common/chrome_switches.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 // Overwrite the job factory that we inherit from the main context so 587 // Overwrite the job factory that we inherit from the main context so
587 // that we can later provide our own handlers for storage related protocols. 588 // that we can later provide our own handlers for storage related protocols.
588 // Install all the usual protocol handlers unless we are in a browser plugin 589 // Install all the usual protocol handlers unless we are in a browser plugin
589 // guest process, in which case only web-safe schemes are allowed. 590 // guest process, in which case only web-safe schemes are allowed.
590 if (!partition_descriptor.in_memory) { 591 if (!partition_descriptor.in_memory) {
591 top_job_factory = SetUpJobFactoryDefaults( 592 top_job_factory = SetUpJobFactoryDefaults(
592 job_factory.Pass(), protocol_handler_interceptor.Pass(), 593 job_factory.Pass(), protocol_handler_interceptor.Pass(),
593 network_delegate(), 594 network_delegate(),
594 ftp_factory_.get()); 595 ftp_factory_.get());
595 } else { 596 } else {
597 job_factory->SetProtocolHandler(
Charlie Reis 2013/09/24 19:41:55 This doesn't make sense to me. First, the comment
nasko 2013/09/24 20:02:01 This indeed looks incorrect and I think it goes ba
Fady Samuel 2013/09/24 23:05:02 Looks like profile_impl_io_data doesn't have enoug
598 extensions::kExtensionScheme,
599 CreateExtensionProtocolHandler(is_incognito(),
600 GetExtensionInfoMap()));
Charlie Reis 2013/09/24 19:41:55 nit: 598-600 all have too much indent.
Fady Samuel 2013/09/24 23:05:02 Done.
596 top_job_factory = job_factory.PassAs<net::URLRequestJobFactory>(); 601 top_job_factory = job_factory.PassAs<net::URLRequestJobFactory>();
597 } 602 }
598 context->SetJobFactory(top_job_factory.Pass()); 603 context->SetJobFactory(top_job_factory.Pass());
599 604
600 return context; 605 return context;
601 } 606 }
602 607
603 ChromeURLRequestContext* 608 ChromeURLRequestContext*
604 ProfileImplIOData::InitializeMediaRequestContext( 609 ProfileImplIOData::InitializeMediaRequestContext(
605 ChromeURLRequestContext* original_context, 610 ChromeURLRequestContext* original_context,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 const base::Closure& completion) { 700 const base::Closure& completion) {
696 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 701 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
697 DCHECK(initialized()); 702 DCHECK(initialized());
698 703
699 DCHECK(transport_security_state()); 704 DCHECK(transport_security_state());
700 // Completes synchronously. 705 // Completes synchronously.
701 transport_security_state()->DeleteAllDynamicDataSince(time); 706 transport_security_state()->DeleteAllDynamicDataSince(time);
702 DCHECK(http_server_properties_manager_); 707 DCHECK(http_server_properties_manager_);
703 http_server_properties_manager_->Clear(completion); 708 http_server_properties_manager_->Clear(completion);
704 } 709 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698