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

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

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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_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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 base::Callback<ChromeURLDataManagerBackend*(void)> 129 base::Callback<ChromeURLDataManagerBackend*(void)>
130 ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const { 130 ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const {
131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
132 LazyInitialize(); 132 LazyInitialize();
133 return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend, 133 return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend,
134 base::Unretained(io_data_)); 134 base::Unretained(io_data_));
135 } 135 }
136 136
137 const content::ResourceContext& 137 content::ResourceContext*
138 ProfileImplIOData::Handle::GetResourceContext() const { 138 ProfileImplIOData::Handle::GetResourceContext() const {
139 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 139 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
140 LazyInitialize(); 140 LazyInitialize();
141 return GetResourceContextNoInit(); 141 return GetResourceContextNoInit();
142 } 142 }
143 143
144 const content::ResourceContext& 144 content::ResourceContext*
145 ProfileImplIOData::Handle::GetResourceContextNoInit() const { 145 ProfileImplIOData::Handle::GetResourceContextNoInit() const {
146 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 146 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
147 // Don't call LazyInitialize here, since the resource context is created at 147 // Don't call LazyInitialize here, since the resource context is created at
148 // the beginning of initalization and is used by some members while they're 148 // the beginning of initalization and is used by some members while they're
149 // being initialized (i.e. AppCacheService). 149 // being initialized (i.e. AppCacheService).
150 return io_data_->GetResourceContext(); 150 return io_data_->GetResourceContext();
151 } 151 }
152 152
153 scoped_refptr<ChromeURLRequestContextGetter> 153 scoped_refptr<ChromeURLRequestContextGetter>
154 ProfileImplIOData::Handle::GetMainRequestContextGetter() const { 154 ProfileImplIOData::Handle::GetMainRequestContextGetter() const {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 scoped_refptr<ChromeURLRequestContext> 503 scoped_refptr<ChromeURLRequestContext>
504 ProfileImplIOData::AcquireIsolatedAppRequestContext( 504 ProfileImplIOData::AcquireIsolatedAppRequestContext(
505 scoped_refptr<ChromeURLRequestContext> main_context, 505 scoped_refptr<ChromeURLRequestContext> main_context,
506 const std::string& app_id) const { 506 const std::string& app_id) const {
507 // We create per-app contexts on demand, unlike the others above. 507 // We create per-app contexts on demand, unlike the others above.
508 scoped_refptr<ChromeURLRequestContext> app_request_context = 508 scoped_refptr<ChromeURLRequestContext> app_request_context =
509 InitializeAppRequestContext(main_context, app_id); 509 InitializeAppRequestContext(main_context, app_id);
510 DCHECK(app_request_context); 510 DCHECK(app_request_context);
511 return app_request_context; 511 return app_request_context;
512 } 512 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698