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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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; |
865 } | 865 } |
866 | 866 |
867 bool ProfileIOData::HaveAlreadySeenOrigin(const url::Origin& origin) { | |
868 return origins_seen_.insert(origin).second == false; | |
felt
2016/04/07 02:28:04
seems unexpected to me (based on method name & des
palmer
2016/04/07 23:45:43
What would you rather do?
I want to let the calle
felt
2016/04/07 23:51:15
I agree it makes sense to keep it a single method.
| |
869 } | |
870 | |
867 void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { | 871 void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() { |
868 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 872 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
869 #if BUILDFLAG(ANDROID_JAVA_UI) | 873 #if BUILDFLAG(ANDROID_JAVA_UI) |
870 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion | 874 // TODO(dwkang): rename or unify the pref for UMA once we have conclusion |
871 // in crbugs.com/246495. | 875 // in crbugs.com/246495. |
872 // Android has it's own preferences for metrics / crash uploading. | 876 // Android has it's own preferences for metrics / crash uploading. |
873 enable_metrics_.Init(prefs::kCrashReportingEnabled, | 877 enable_metrics_.Init(prefs::kCrashReportingEnabled, |
874 g_browser_process->local_state()); | 878 g_browser_process->local_state()); |
875 enable_metrics_.MoveToThread( | 879 enable_metrics_.MoveToThread( |
876 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 880 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1318 make_scoped_ptr(new DevToolsNetworkTransactionFactory( | 1322 make_scoped_ptr(new DevToolsNetworkTransactionFactory( |
1319 network_controller_handle_.GetController(), shared_session)), | 1323 network_controller_handle_.GetController(), shared_session)), |
1320 std::move(backend), true /* set_up_quic_server_info */)); | 1324 std::move(backend), true /* set_up_quic_server_info */)); |
1321 } | 1325 } |
1322 | 1326 |
1323 void ProfileIOData::SetCookieSettingsForTesting( | 1327 void ProfileIOData::SetCookieSettingsForTesting( |
1324 content_settings::CookieSettings* cookie_settings) { | 1328 content_settings::CookieSettings* cookie_settings) { |
1325 DCHECK(!cookie_settings_.get()); | 1329 DCHECK(!cookie_settings_.get()); |
1326 cookie_settings_ = cookie_settings; | 1330 cookie_settings_ = cookie_settings; |
1327 } | 1331 } |
OLD | NEW |