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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } // namespace | 83 } // namespace |
84 | 84 |
85 OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) | 85 OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) |
86 : profile_(real_profile), | 86 : profile_(real_profile), |
87 prefs_(PrefServiceSyncable::IncognitoFromProfile(real_profile)), | 87 prefs_(PrefServiceSyncable::IncognitoFromProfile(real_profile)), |
88 io_data_(this), | 88 io_data_(this), |
89 start_time_(Time::Now()), | 89 start_time_(Time::Now()), |
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 user_prefs::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 DCHECK_NE(IncognitoModePrefs::DISABLED, | 100 DCHECK_NE(IncognitoModePrefs::DISABLED, |
101 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); | 101 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); |
102 | 102 |
103 #if defined(OS_ANDROID) || defined(OS_IOS) | 103 #if defined(OS_ANDROID) || defined(OS_IOS) |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: | 461 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: |
462 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); | 462 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); |
463 return; | 463 return; |
464 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: | 464 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: |
465 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, | 465 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, |
466 change.host, | 466 change.host, |
467 change.zoom_level); | 467 change.zoom_level); |
468 return; | 468 return; |
469 } | 469 } |
470 } | 470 } |
OLD | NEW |