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

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

Issue 7847027: DownloadId (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "content/common/notification_service.h" 48 #include "content/common/notification_service.h"
49 #include "net/base/origin_bound_cert_service.h" 49 #include "net/base/origin_bound_cert_service.h"
50 #include "net/http/http_transaction_factory.h" 50 #include "net/http/http_transaction_factory.h"
51 #include "net/http/http_util.h" 51 #include "net/http/http_util.h"
52 #include "net/proxy/proxy_config_service_fixed.h" 52 #include "net/proxy/proxy_config_service_fixed.h"
53 #include "net/proxy/proxy_script_fetcher_impl.h" 53 #include "net/proxy/proxy_script_fetcher_impl.h"
54 #include "net/proxy/proxy_service.h" 54 #include "net/proxy/proxy_service.h"
55 #include "net/url_request/url_request.h" 55 #include "net/url_request/url_request.h"
56 #include "webkit/blob/blob_data.h" 56 #include "webkit/blob/blob_data.h"
57 #include "webkit/blob/blob_url_request_job_factory.h" 57 #include "webkit/blob/blob_url_request_job_factory.h"
58 #include "webkit/database/database_tracker.h"
58 #include "webkit/fileapi/file_system_context.h" 59 #include "webkit/fileapi/file_system_context.h"
59 #include "webkit/fileapi/file_system_url_request_job_factory.h" 60 #include "webkit/fileapi/file_system_url_request_job_factory.h"
60 #include "webkit/database/database_tracker.h"
61 #include "webkit/quota/quota_manager.h" 61 #include "webkit/quota/quota_manager.h"
62 62
63 #if defined(OS_CHROMEOS) 63 #if defined(OS_CHROMEOS)
64 #include "chrome/browser/chromeos/gview_request_interceptor.h" 64 #include "chrome/browser/chromeos/gview_request_interceptor.h"
65 #endif // defined(OS_CHROMEOS) 65 #endif // defined(OS_CHROMEOS)
66 66
67 namespace { 67 namespace {
68 68
69 // ---------------------------------------------------------------------------- 69 // ----------------------------------------------------------------------------
70 // CookieMonster::Delegate implementation 70 // CookieMonster::Delegate implementation
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return profile->GetPrerenderManager(); 186 return profile->GetPrerenderManager();
187 return NULL; 187 return NULL;
188 } 188 }
189 189
190 } // namespace 190 } // namespace
191 191
192 void ProfileIOData::InitializeOnUIThread(Profile* profile) { 192 void ProfileIOData::InitializeOnUIThread(Profile* profile) {
193 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 193 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
194 PrefService* pref_service = profile->GetPrefs(); 194 PrefService* pref_service = profile->GetPrefs();
195 195
196 next_download_id_thunk_ = profile->GetDownloadManager()->GetNextIdThunk();
197
196 scoped_ptr<ProfileParams> params(new ProfileParams); 198 scoped_ptr<ProfileParams> params(new ProfileParams);
197 params->is_incognito = profile->IsOffTheRecord(); 199 params->is_incognito = profile->IsOffTheRecord();
198 params->clear_local_state_on_exit = 200 params->clear_local_state_on_exit =
199 pref_service->GetBoolean(prefs::kClearSiteDataOnExit); 201 pref_service->GetBoolean(prefs::kClearSiteDataOnExit);
200 202
201 params->appcache_service = profile->GetAppCacheService(); 203 params->appcache_service = profile->GetAppCacheService();
202 204
203 // Set up Accept-Language and Accept-Charset header values 205 // Set up Accept-Language and Accept-Charset header values
204 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader( 206 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader(
205 pref_service->GetString(prefs::kAcceptLanguages)); 207 pref_service->GetString(prefs::kAcceptLanguages));
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 resource_context_.set_database_tracker(database_tracker_); 492 resource_context_.set_database_tracker(database_tracker_);
491 resource_context_.set_appcache_service(appcache_service_); 493 resource_context_.set_appcache_service(appcache_service_);
492 resource_context_.set_blob_storage_context(blob_storage_context_); 494 resource_context_.set_blob_storage_context(blob_storage_context_);
493 resource_context_.set_file_system_context(file_system_context_); 495 resource_context_.set_file_system_context(file_system_context_);
494 resource_context_.set_quota_manager(quota_manager_); 496 resource_context_.set_quota_manager(quota_manager_);
495 resource_context_.set_host_zoom_map(host_zoom_map_); 497 resource_context_.set_host_zoom_map(host_zoom_map_);
496 resource_context_.set_prerender_manager_getter(prerender_manager_getter_); 498 resource_context_.set_prerender_manager_getter(prerender_manager_getter_);
497 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this)); 499 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this));
498 resource_context_.set_media_observer( 500 resource_context_.set_media_observer(
499 io_thread_globals->media.media_internals.get()); 501 io_thread_globals->media.media_internals.get());
502 resource_context_.set_next_download_id_thunk(next_download_id_thunk_);
500 503
501 LazyInitializeInternal(profile_params_.get()); 504 LazyInitializeInternal(profile_params_.get());
502 505
503 profile_params_.reset(); 506 profile_params_.reset();
504 initialized_ = true; 507 initialized_ = true;
505 } 508 }
506 509
507 void ProfileIOData::ApplyProfileParamsToContext( 510 void ProfileIOData::ApplyProfileParamsToContext(
508 ChromeURLRequestContext* context) const { 511 ChromeURLRequestContext* context) const {
509 context->set_is_incognito(profile_params_->is_incognito); 512 context->set_is_incognito(profile_params_->is_incognito);
(...skipping 23 matching lines...) Expand all
533 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 536 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
534 new DeleteTask<ProfileIOData>(this)); 537 new DeleteTask<ProfileIOData>(this));
535 if (!posted) 538 if (!posted)
536 delete this; 539 delete this;
537 } 540 }
538 541
539 void ProfileIOData::set_origin_bound_cert_service( 542 void ProfileIOData::set_origin_bound_cert_service(
540 net::OriginBoundCertService* origin_bound_cert_service) const { 543 net::OriginBoundCertService* origin_bound_cert_service) const {
541 origin_bound_cert_service_.reset(origin_bound_cert_service); 544 origin_bound_cert_service_.reset(origin_bound_cert_service);
542 } 545 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | content/browser/download/download_file_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698