OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/off_the_record_profile_impl.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_impl.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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 240 } |
241 | 241 |
242 AutocompleteClassifier* OffTheRecordProfileImpl::GetAutocompleteClassifier() { | 242 AutocompleteClassifier* OffTheRecordProfileImpl::GetAutocompleteClassifier() { |
243 return profile_->GetAutocompleteClassifier(); | 243 return profile_->GetAutocompleteClassifier(); |
244 } | 244 } |
245 | 245 |
246 history::ShortcutsBackend* OffTheRecordProfileImpl::GetShortcutsBackend() { | 246 history::ShortcutsBackend* OffTheRecordProfileImpl::GetShortcutsBackend() { |
247 return NULL; | 247 return NULL; |
248 } | 248 } |
249 | 249 |
250 WebDataService* OffTheRecordProfileImpl::GetWebDataService( | |
251 ServiceAccessType sat) { | |
252 if (sat == EXPLICIT_ACCESS) | |
253 return profile_->GetWebDataService(sat); | |
254 | |
255 NOTREACHED() << "This profile is OffTheRecord"; | |
256 return NULL; | |
257 } | |
258 | |
259 WebDataService* OffTheRecordProfileImpl::GetWebDataServiceWithoutCreating() { | |
260 return profile_->GetWebDataServiceWithoutCreating(); | |
261 } | |
262 | |
263 PrefService* OffTheRecordProfileImpl::GetPrefs() { | 250 PrefService* OffTheRecordProfileImpl::GetPrefs() { |
264 return prefs_; | 251 return prefs_; |
265 } | 252 } |
266 | 253 |
267 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { | 254 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { |
268 return prefs_; | 255 return prefs_; |
269 } | 256 } |
270 | 257 |
271 DownloadManager* OffTheRecordProfileImpl::GetDownloadManager() { | 258 DownloadManager* OffTheRecordProfileImpl::GetDownloadManager() { |
272 return DownloadServiceFactory::GetForProfile(this)->GetDownloadManager(); | 259 return DownloadServiceFactory::GetForProfile(this)->GetDownloadManager(); |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 OffTheRecordProfileImpl* profile = NULL; | 476 OffTheRecordProfileImpl* profile = NULL; |
490 #if defined(OS_CHROMEOS) | 477 #if defined(OS_CHROMEOS) |
491 if (Profile::IsGuestSession()) | 478 if (Profile::IsGuestSession()) |
492 profile = new GuestSessionProfile(this); | 479 profile = new GuestSessionProfile(this); |
493 #endif | 480 #endif |
494 if (!profile) | 481 if (!profile) |
495 profile = new OffTheRecordProfileImpl(this); | 482 profile = new OffTheRecordProfileImpl(this); |
496 profile->Init(); | 483 profile->Init(); |
497 return profile; | 484 return profile; |
498 } | 485 } |
OLD | NEW |