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

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

Issue 10535026: Move creation and ownership of DownloadManager from the embedder to content. This matches all the o… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros compile Created 8 years, 6 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/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.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/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "net/base/transport_security_state.h" 50 #include "net/base/transport_security_state.h"
51 #include "net/http/http_server_properties.h" 51 #include "net/http/http_server_properties.h"
52 #include "webkit/database/database_tracker.h" 52 #include "webkit/database/database_tracker.h"
53 53
54 #if defined(OS_CHROMEOS) 54 #if defined(OS_CHROMEOS)
55 #include "chrome/browser/chromeos/preferences.h" 55 #include "chrome/browser/chromeos/preferences.h"
56 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 56 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
57 #endif 57 #endif
58 58
59 using content::BrowserThread; 59 using content::BrowserThread;
60 using content::DownloadManager; 60 using content::DownloadManagerDelegate;
61 using content::HostZoomMap; 61 using content::HostZoomMap;
62 62
63 namespace { 63 namespace {
64 64
65 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, 65 void NotifyOTRProfileCreatedOnIOThread(void* original_profile,
66 void* otr_profile) { 66 void* otr_profile) {
67 ExtensionWebRequestEventRouter::GetInstance()->OnOTRProfileCreated( 67 ExtensionWebRequestEventRouter::GetInstance()->OnOTRProfileCreated(
68 original_profile, otr_profile); 68 original_profile, otr_profile);
69 } 69 }
70 70
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 252
253 PrefService* OffTheRecordProfileImpl::GetPrefs() { 253 PrefService* OffTheRecordProfileImpl::GetPrefs() {
254 return prefs_; 254 return prefs_;
255 } 255 }
256 256
257 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { 257 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() {
258 return prefs_; 258 return prefs_;
259 } 259 }
260 260
261 DownloadManager* OffTheRecordProfileImpl::GetDownloadManager() { 261 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() {
262 return DownloadServiceFactory::GetForProfile(this)->GetDownloadManager(); 262 return DownloadServiceFactory::GetForProfile(this)->
263 GetDownloadManagerDelegate();
263 } 264 }
264 265
265 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { 266 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() {
266 return io_data_.GetMainRequestContextGetter(); 267 return io_data_.GetMainRequestContextGetter();
267 } 268 }
268 269
269 net::URLRequestContextGetter* 270 net::URLRequestContextGetter*
270 OffTheRecordProfileImpl::GetRequestContextForRenderProcess( 271 OffTheRecordProfileImpl::GetRequestContextForRenderProcess(
271 int renderer_child_id) { 272 int renderer_child_id) {
272 if (GetExtensionService()) { 273 if (GetExtensionService()) {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 if (!profile) 476 if (!profile)
476 profile = new OffTheRecordProfileImpl(this); 477 profile = new OffTheRecordProfileImpl(this);
477 profile->Init(); 478 profile->Init();
478 return profile; 479 return profile;
479 } 480 }
480 481
481 base::Callback<ChromeURLDataManagerBackend*(void)> 482 base::Callback<ChromeURLDataManagerBackend*(void)>
482 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { 483 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const {
483 return io_data_.GetChromeURLDataManagerBackendGetter(); 484 return io_data_.GetChromeURLDataManagerBackendGetter();
484 } 485 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698