| 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_util.h" | 10 #include "base/file_util.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 start_time_(Time::Now()), | 90 start_time_(Time::Now()), |
| 91 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, | 91 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, |
| 92 base::Unretained(this))) { | 92 base::Unretained(this))) { |
| 93 // Register on BrowserContext. | 93 // Register on BrowserContext. |
| 94 components::UserPrefs::Set(this, prefs_); | 94 components::UserPrefs::Set(this, prefs_); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void OffTheRecordProfileImpl::Init() { | 97 void OffTheRecordProfileImpl::Init() { |
| 98 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); | 98 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); |
| 99 | 99 |
| 100 extensions::ExtensionSystem::Get(this)->InitForOTRProfile(); | |
| 101 | |
| 102 DCHECK_NE(IncognitoModePrefs::DISABLED, | 100 DCHECK_NE(IncognitoModePrefs::DISABLED, |
| 103 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); | 101 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); |
| 104 | 102 |
| 105 #if defined(OS_ANDROID) || defined(OS_IOS) | 103 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 106 UseSystemProxy(); | 104 UseSystemProxy(); |
| 107 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 105 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
| 108 | 106 |
| 109 // TODO(oshima): Remove the need to eagerly initialize the request context | 107 // TODO(oshima): Remove the need to eagerly initialize the request context |
| 110 // getter. chromeos::OnlineAttempt is illegally trying to access this | 108 // getter. chromeos::OnlineAttempt is illegally trying to access this |
| 111 // Profile member from a thread other than the UI thread, so we need to | 109 // Profile member from a thread other than the UI thread, so we need to |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: | 469 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: |
| 472 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); | 470 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); |
| 473 return; | 471 return; |
| 474 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: | 472 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: |
| 475 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, | 473 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, |
| 476 change.host, | 474 change.host, |
| 477 change.zoom_level); | 475 change.zoom_level); |
| 478 return; | 476 return; |
| 479 } | 477 } |
| 480 } | 478 } |
| OLD | NEW |