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

Side by Side Diff: chrome/browser/profile.cc

Issue 195077: Tell the AppCacheService which request context to use when fetching resources... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | chrome/common/appcache/chrome_appcache_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/profile.h" 5 #include "chrome/browser/profile.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 NOTREACHED(); 217 NOTREACHED();
218 } 218 }
219 219
220 virtual Profile* GetOriginalProfile() { 220 virtual Profile* GetOriginalProfile() {
221 return profile_; 221 return profile_;
222 } 222 }
223 223
224 virtual ChromeAppCacheService* GetAppCacheService() { 224 virtual ChromeAppCacheService* GetAppCacheService() {
225 if (!appcache_service_.get()) { 225 if (!appcache_service_.get()) {
226 appcache_service_ = new ChromeAppCacheService(); 226 appcache_service_ = new ChromeAppCacheService();
227 appcache_service_->InitializeOnUIThread(GetPath(), true); 227 appcache_service_->InitializeOnUIThread(
228 GetPath(), GetRequestContext(), true);
228 } 229 }
229 return appcache_service_.get(); 230 return appcache_service_.get();
230 } 231 }
231 232
232 virtual VisitedLinkMaster* GetVisitedLinkMaster() { 233 virtual VisitedLinkMaster* GetVisitedLinkMaster() {
233 // We don't provide access to the VisitedLinkMaster when we're OffTheRecord 234 // We don't provide access to the VisitedLinkMaster when we're OffTheRecord
234 // because we don't want to leak the sites that the user has visited before. 235 // because we don't want to leak the sites that the user has visited before.
235 return NULL; 236 return NULL;
236 } 237 }
237 238
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 off_the_record_profile_.reset(); 774 off_the_record_profile_.reset();
774 } 775 }
775 776
776 Profile* ProfileImpl::GetOriginalProfile() { 777 Profile* ProfileImpl::GetOriginalProfile() {
777 return this; 778 return this;
778 } 779 }
779 780
780 ChromeAppCacheService* ProfileImpl::GetAppCacheService() { 781 ChromeAppCacheService* ProfileImpl::GetAppCacheService() {
781 if (!appcache_service_.get()) { 782 if (!appcache_service_.get()) {
782 appcache_service_ = new ChromeAppCacheService(); 783 appcache_service_ = new ChromeAppCacheService();
783 appcache_service_->InitializeOnUIThread(GetPath(), false); 784 appcache_service_->InitializeOnUIThread(
785 GetPath(), GetRequestContext(), false);
784 } 786 }
785 return appcache_service_.get(); 787 return appcache_service_.get();
786 } 788 }
787 789
788 VisitedLinkMaster* ProfileImpl::GetVisitedLinkMaster() { 790 VisitedLinkMaster* ProfileImpl::GetVisitedLinkMaster() {
789 if (!visited_link_master_.get()) { 791 if (!visited_link_master_.get()) {
790 scoped_ptr<VisitedLinkMaster> visited_links( 792 scoped_ptr<VisitedLinkMaster> visited_links(
791 new VisitedLinkMaster(g_browser_process->file_thread(), 793 new VisitedLinkMaster(g_browser_process->file_thread(),
792 visited_link_event_listener_.get(), this)); 794 visited_link_event_listener_.get(), this));
793 if (!visited_links->Init()) 795 if (!visited_links->Init())
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 #endif 1323 #endif
1322 return NULL; 1324 return NULL;
1323 } 1325 }
1324 1326
1325 void ProfileImpl::InitSyncService() { 1327 void ProfileImpl::InitSyncService() {
1326 #ifdef CHROME_PERSONALIZATION 1328 #ifdef CHROME_PERSONALIZATION
1327 sync_service_.reset(new ProfileSyncService(this)); 1329 sync_service_.reset(new ProfileSyncService(this));
1328 sync_service_->Initialize(); 1330 sync_service_->Initialize();
1329 #endif 1331 #endif
1330 } 1332 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/appcache/chrome_appcache_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698