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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) | 81 OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) |
82 : profile_(real_profile), | 82 : profile_(real_profile), |
83 prefs_(real_profile->GetOffTheRecordPrefs()), | 83 prefs_(real_profile->GetOffTheRecordPrefs()), |
84 ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)), | 84 ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)), |
85 start_time_(Time::Now()) { | 85 start_time_(Time::Now()) { |
86 } | 86 } |
87 | 87 |
88 void OffTheRecordProfileImpl::Init() { | 88 void OffTheRecordProfileImpl::Init() { |
89 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); | 89 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); |
90 | 90 |
| 91 extensions::ExtensionSystem::Get(this)->InitForOTRProfile(); |
| 92 |
91 DCHECK_NE(IncognitoModePrefs::DISABLED, | 93 DCHECK_NE(IncognitoModePrefs::DISABLED, |
92 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); | 94 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); |
93 | 95 |
94 // TODO(oshima): Remove the need to eagerly initialize the request context | 96 // TODO(oshima): Remove the need to eagerly initialize the request context |
95 // getter. chromeos::OnlineAttempt is illegally trying to access this | 97 // getter. chromeos::OnlineAttempt is illegally trying to access this |
96 // Profile member from a thread other than the UI thread, so we need to | 98 // Profile member from a thread other than the UI thread, so we need to |
97 // prevent a race. | 99 // prevent a race. |
98 #if defined(OS_CHROMEOS) | 100 #if defined(OS_CHROMEOS) |
99 GetRequestContext(); | 101 GetRequestContext(); |
100 #endif // defined(OS_CHROMEOS) | 102 #endif // defined(OS_CHROMEOS) |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 if (!profile) | 483 if (!profile) |
482 profile = new OffTheRecordProfileImpl(this); | 484 profile = new OffTheRecordProfileImpl(this); |
483 profile->Init(); | 485 profile->Init(); |
484 return profile; | 486 return profile; |
485 } | 487 } |
486 | 488 |
487 base::Callback<ChromeURLDataManagerBackend*(void)> | 489 base::Callback<ChromeURLDataManagerBackend*(void)> |
488 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 490 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
489 return io_data_.GetChromeURLDataManagerBackendGetter(); | 491 return io_data_.GetChromeURLDataManagerBackendGetter(); |
490 } | 492 } |
OLD | NEW |