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

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

Issue 7793003: Revert 98656 - Make a new integer field in sql::MetaTable (a per-profile db) containing a counter... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "content/common/notification_service.h" 47 #include "content/common/notification_service.h"
48 #include "net/base/origin_bound_cert_service.h" 48 #include "net/base/origin_bound_cert_service.h"
49 #include "net/http/http_transaction_factory.h" 49 #include "net/http/http_transaction_factory.h"
50 #include "net/http/http_util.h" 50 #include "net/http/http_util.h"
51 #include "net/proxy/proxy_config_service_fixed.h" 51 #include "net/proxy/proxy_config_service_fixed.h"
52 #include "net/proxy/proxy_script_fetcher_impl.h" 52 #include "net/proxy/proxy_script_fetcher_impl.h"
53 #include "net/proxy/proxy_service.h" 53 #include "net/proxy/proxy_service.h"
54 #include "net/url_request/url_request.h" 54 #include "net/url_request/url_request.h"
55 #include "webkit/blob/blob_data.h" 55 #include "webkit/blob/blob_data.h"
56 #include "webkit/blob/blob_url_request_job_factory.h" 56 #include "webkit/blob/blob_url_request_job_factory.h"
57 #include "webkit/database/database_tracker.h"
58 #include "webkit/fileapi/file_system_context.h" 57 #include "webkit/fileapi/file_system_context.h"
59 #include "webkit/fileapi/file_system_url_request_job_factory.h" 58 #include "webkit/fileapi/file_system_url_request_job_factory.h"
59 #include "webkit/database/database_tracker.h"
60 #include "webkit/quota/quota_manager.h" 60 #include "webkit/quota/quota_manager.h"
61 61
62 #if defined(OS_CHROMEOS) 62 #if defined(OS_CHROMEOS)
63 #include "chrome/browser/chromeos/gview_request_interceptor.h" 63 #include "chrome/browser/chromeos/gview_request_interceptor.h"
64 #endif // defined(OS_CHROMEOS) 64 #endif // defined(OS_CHROMEOS)
65 65
66 namespace { 66 namespace {
67 67
68 // ---------------------------------------------------------------------------- 68 // ----------------------------------------------------------------------------
69 // CookieMonster::Delegate implementation 69 // CookieMonster::Delegate implementation
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return profile->GetPrerenderManager(); 185 return profile->GetPrerenderManager();
186 return NULL; 186 return NULL;
187 } 187 }
188 188
189 } // namespace 189 } // namespace
190 190
191 void ProfileIOData::InitializeProfileParams(Profile* profile) { 191 void ProfileIOData::InitializeProfileParams(Profile* profile) {
192 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 192 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
193 PrefService* pref_service = profile->GetPrefs(); 193 PrefService* pref_service = profile->GetPrefs();
194 194
195 next_download_id_thunk_ = profile->GetDownloadManager()->GetNextIdThunk();
196
197 scoped_ptr<ProfileParams> params(new ProfileParams); 195 scoped_ptr<ProfileParams> params(new ProfileParams);
198 params->is_incognito = profile->IsOffTheRecord(); 196 params->is_incognito = profile->IsOffTheRecord();
199 params->clear_local_state_on_exit = 197 params->clear_local_state_on_exit =
200 pref_service->GetBoolean(prefs::kClearSiteDataOnExit); 198 pref_service->GetBoolean(prefs::kClearSiteDataOnExit);
201 199
202 params->appcache_service = profile->GetAppCacheService(); 200 params->appcache_service = profile->GetAppCacheService();
203 201
204 // Set up Accept-Language and Accept-Charset header values 202 // Set up Accept-Language and Accept-Charset header values
205 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader( 203 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader(
206 pref_service->GetString(prefs::kAcceptLanguages)); 204 pref_service->GetString(prefs::kAcceptLanguages));
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 resource_context_.set_database_tracker(database_tracker_); 479 resource_context_.set_database_tracker(database_tracker_);
482 resource_context_.set_appcache_service(appcache_service_); 480 resource_context_.set_appcache_service(appcache_service_);
483 resource_context_.set_blob_storage_context(blob_storage_context_); 481 resource_context_.set_blob_storage_context(blob_storage_context_);
484 resource_context_.set_file_system_context(file_system_context_); 482 resource_context_.set_file_system_context(file_system_context_);
485 resource_context_.set_quota_manager(quota_manager_); 483 resource_context_.set_quota_manager(quota_manager_);
486 resource_context_.set_host_zoom_map(host_zoom_map_); 484 resource_context_.set_host_zoom_map(host_zoom_map_);
487 resource_context_.set_prerender_manager_getter(prerender_manager_getter_); 485 resource_context_.set_prerender_manager_getter(prerender_manager_getter_);
488 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this)); 486 resource_context_.SetUserData(NULL, const_cast<ProfileIOData*>(this));
489 resource_context_.set_media_observer( 487 resource_context_.set_media_observer(
490 io_thread_globals->media.media_internals.get()); 488 io_thread_globals->media.media_internals.get());
491 resource_context_.set_next_download_id_thunk(next_download_id_thunk_);
492 489
493 LazyInitializeInternal(profile_params_.get()); 490 LazyInitializeInternal(profile_params_.get());
494 491
495 profile_params_.reset(); 492 profile_params_.reset();
496 initialized_ = true; 493 initialized_ = true;
497 } 494 }
498 495
499 void ProfileIOData::ApplyProfileParamsToContext( 496 void ProfileIOData::ApplyProfileParamsToContext(
500 ChromeURLRequestContext* context) const { 497 ChromeURLRequestContext* context) const {
501 context->set_is_incognito(profile_params_->is_incognito); 498 context->set_is_incognito(profile_params_->is_incognito);
(...skipping 19 matching lines...) Expand all
521 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 518 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
522 new DeleteTask<ProfileIOData>(this)); 519 new DeleteTask<ProfileIOData>(this));
523 if (!posted) 520 if (!posted)
524 delete this; 521 delete this;
525 } 522 }
526 523
527 void ProfileIOData::set_origin_bound_cert_service( 524 void ProfileIOData::set_origin_bound_cert_service(
528 net::OriginBoundCertService* origin_bound_cert_service) const { 525 net::OriginBoundCertService* origin_bound_cert_service) const {
529 origin_bound_cert_service_.reset(origin_bound_cert_service); 526 origin_bound_cert_service_.reset(origin_bound_cert_service);
530 } 527 }
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