| 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/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, | 90 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, |
| 91 base::Unretained(this))) { | 91 base::Unretained(this))) { |
| 92 // Register on BrowserContext. | 92 // Register on BrowserContext. |
| 93 components::UserPrefs::Set(this, prefs_); | 93 components::UserPrefs::Set(this, prefs_); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void OffTheRecordProfileImpl::Init() { | 96 void OffTheRecordProfileImpl::Init() { |
| 97 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( | 97 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( |
| 98 this, false); | 98 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: | 461 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: |
| 464 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); | 462 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); |
| 465 return; | 463 return; |
| 466 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: | 464 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: |
| 467 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, | 465 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, |
| 468 change.host, | 466 change.host, |
| 469 change.zoom_level); | 467 change.zoom_level); |
| 470 return; | 468 return; |
| 471 } | 469 } |
| 472 } | 470 } |
| OLD | NEW |