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/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
854 DCHECK(initialized_); | 854 DCHECK(initialized_); |
855 return host_content_settings_map_.get(); | 855 return host_content_settings_map_.get(); |
856 } | 856 } |
857 | 857 |
858 ResourceContext::SaltCallback ProfileIOData::GetMediaDeviceIDSalt() const { | 858 ResourceContext::SaltCallback ProfileIOData::GetMediaDeviceIDSalt() const { |
859 return base::Bind(&MediaDeviceIDSalt::GetSalt, media_device_id_salt_); | 859 return base::Bind(&MediaDeviceIDSalt::GetSalt, media_device_id_salt_); |
860 } | 860 } |
861 | 861 |
862 bool ProfileIOData::IsOffTheRecord() const { | 862 bool ProfileIOData::IsOffTheRecord() const { |
863 return profile_type() == Profile::INCOGNITO_PROFILE | 863 return profile_type() == Profile::INCOGNITO_PROFILE |
864 || profile_type() == Profile::GUEST_PROFILE; | 864 || profile_type() == Profile::GUEST_PROFILE; |
felt
2016/04/01 00:04:50
Ah yes, here... this version includes both INCOGNI
palmer
2016/04/05 23:42:18
Acknowledged.
| |
865 } | 865 } |
866 | 866 |
867 bool ProfileIOData::HaveAlreadySeenOrigin(const url::Origin& origin) { | |
868 DCHECK(IsOffTheRecord()) << "Only code running Off The Record should call " | |
869 << __PRETTY_FUNCTION__; | |
870 return false; | |
871 } | |
872 | |
867 void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { | 873 void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { |
868 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 874 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
869 #if BUILDFLAG(ANDROID_JAVA_UI) | 875 #if BUILDFLAG(ANDROID_JAVA_UI) |
870 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion | 876 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion |
871 // in crbugs.com/246495. | 877 // in crbugs.com/246495. |
872 // Android has it's own preferences for metrics / crash uploading. | 878 // Android has it's own preferences for metrics / crash uploading. |
873 enable_metrics_.Init(prefs::kCrashReportingEnabled, | 879 enable_metrics_.Init(prefs::kCrashReportingEnabled, |
874 g_browser_process->local_state()); | 880 g_browser_process->local_state()); |
875 enable_metrics_.MoveToThread( | 881 enable_metrics_.MoveToThread( |
876 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 882 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1319 make_scoped_ptr(new DevToolsNetworkTransactionFactory( | 1325 make_scoped_ptr(new DevToolsNetworkTransactionFactory( |
1320 network_controller_handle_.GetController(), shared_session)), | 1326 network_controller_handle_.GetController(), shared_session)), |
1321 std::move(backend), true /* set_up_quic_server_info */)); | 1327 std::move(backend), true /* set_up_quic_server_info */)); |
1322 } | 1328 } |
1323 | 1329 |
1324 void ProfileIOData::SetCookieSettingsForTesting( | 1330 void ProfileIOData::SetCookieSettingsForTesting( |
1325 content_settings::CookieSettings* cookie_settings) { | 1331 content_settings::CookieSettings* cookie_settings) { |
1326 DCHECK(!cookie_settings_.get()); | 1332 DCHECK(!cookie_settings_.get()); |
1327 cookie_settings_ = cookie_settings; | 1333 cookie_settings_ = cookie_settings; |
1328 } | 1334 } |
OLD | NEW |