OLD | NEW |
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.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 virtual ChromeAppCacheService* GetAppCacheService() { | 241 virtual ChromeAppCacheService* GetAppCacheService() { |
242 if (!appcache_service_) { | 242 if (!appcache_service_) { |
243 appcache_service_ = new ChromeAppCacheService; | 243 appcache_service_ = new ChromeAppCacheService; |
244 BrowserThread::PostTask( | 244 BrowserThread::PostTask( |
245 BrowserThread::IO, FROM_HERE, | 245 BrowserThread::IO, FROM_HERE, |
246 NewRunnableMethod( | 246 NewRunnableMethod( |
247 appcache_service_.get(), | 247 appcache_service_.get(), |
248 &ChromeAppCacheService::InitializeOnIOThread, | 248 &ChromeAppCacheService::InitializeOnIOThread, |
249 IsOffTheRecord() | 249 IsOffTheRecord() |
250 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), | 250 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), |
251 make_scoped_refptr(GetHostContentSettingsMap()), | 251 &GetResourceContext(), |
252 make_scoped_refptr(GetExtensionSpecialStoragePolicy()), | 252 make_scoped_refptr(GetExtensionSpecialStoragePolicy()), |
253 false)); | 253 false)); |
254 } | 254 } |
255 return appcache_service_; | 255 return appcache_service_; |
256 } | 256 } |
257 | 257 |
258 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() { | 258 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() { |
259 if (!db_tracker_.get()) { | 259 if (!db_tracker_.get()) { |
260 db_tracker_ = new webkit_database::DatabaseTracker( | 260 db_tracker_ = new webkit_database::DatabaseTracker( |
261 GetPath(), IsOffTheRecord(), GetExtensionSpecialStoragePolicy()); | 261 GetPath(), IsOffTheRecord(), GetExtensionSpecialStoragePolicy()); |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 }; | 763 }; |
764 #endif | 764 #endif |
765 | 765 |
766 Profile* Profile::CreateOffTheRecordProfile() { | 766 Profile* Profile::CreateOffTheRecordProfile() { |
767 #if defined(OS_CHROMEOS) | 767 #if defined(OS_CHROMEOS) |
768 if (Profile::IsGuestSession()) | 768 if (Profile::IsGuestSession()) |
769 return new GuestSessionProfile(this); | 769 return new GuestSessionProfile(this); |
770 #endif | 770 #endif |
771 return new OffTheRecordProfileImpl(this); | 771 return new OffTheRecordProfileImpl(this); |
772 } | 772 } |
OLD | NEW |