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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 239 } |
240 | 240 |
241 AutocompleteClassifier* OffTheRecordProfileImpl::GetAutocompleteClassifier() { | 241 AutocompleteClassifier* OffTheRecordProfileImpl::GetAutocompleteClassifier() { |
242 return profile_->GetAutocompleteClassifier(); | 242 return profile_->GetAutocompleteClassifier(); |
243 } | 243 } |
244 | 244 |
245 history::ShortcutsBackend* OffTheRecordProfileImpl::GetShortcutsBackend() { | 245 history::ShortcutsBackend* OffTheRecordProfileImpl::GetShortcutsBackend() { |
246 return NULL; | 246 return NULL; |
247 } | 247 } |
248 | 248 |
249 WebDataService* OffTheRecordProfileImpl::GetWebDataService( | |
250 ServiceAccessType sat) { | |
251 if (sat == EXPLICIT_ACCESS) | |
252 return profile_->GetWebDataService(sat); | |
253 | |
254 NOTREACHED() << "This profile is OffTheRecord"; | |
255 return NULL; | |
256 } | |
257 | |
258 WebDataService* OffTheRecordProfileImpl::GetWebDataServiceWithoutCreating() { | |
259 return profile_->GetWebDataServiceWithoutCreating(); | |
260 } | |
261 | |
262 PrefService* OffTheRecordProfileImpl::GetPrefs() { | 249 PrefService* OffTheRecordProfileImpl::GetPrefs() { |
263 return prefs_; | 250 return prefs_; |
264 } | 251 } |
265 | 252 |
266 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { | 253 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { |
267 return prefs_; | 254 return prefs_; |
268 } | 255 } |
269 | 256 |
270 DownloadManager* OffTheRecordProfileImpl::GetDownloadManager() { | 257 DownloadManager* OffTheRecordProfileImpl::GetDownloadManager() { |
271 return DownloadServiceFactory::GetForProfile(this)->GetDownloadManager(); | 258 return DownloadServiceFactory::GetForProfile(this)->GetDownloadManager(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 if (!profile) | 471 if (!profile) |
485 profile = new OffTheRecordProfileImpl(this); | 472 profile = new OffTheRecordProfileImpl(this); |
486 profile->Init(); | 473 profile->Init(); |
487 return profile; | 474 return profile; |
488 } | 475 } |
489 | 476 |
490 base::Callback<ChromeURLDataManagerBackend*(void)> | 477 base::Callback<ChromeURLDataManagerBackend*(void)> |
491 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 478 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
492 return io_data_.GetChromeURLDataManagerBackendGetter(); | 479 return io_data_.GetChromeURLDataManagerBackendGetter(); |
493 } | 480 } |
OLD | NEW |