Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2179)

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 4ae0c4e45101d27bddaf297bd83b0bb2d5125317..a16a24a25898da4a806b2749fc116c72e17b8f1a 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -536,7 +536,7 @@ void ProfileImpl::DoFinalInit() {
#if defined(ENABLE_PLUGINS)
ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
- PluginPrefs::GetForProfile(this),
+ PluginPrefs::GetForProfile(this).get(),
io_data_.GetResourceContextNoInit());
#endif
@@ -707,7 +707,7 @@ ExtensionSpecialStoragePolicy*
if (!extension_special_storage_policy_.get()) {
TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy")
extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(
- CookieSettings::Factory::GetForProfile(this));
+ CookieSettings::Factory::GetForProfile(this).get());
}
return extension_special_storage_policy_.get();
}
@@ -816,10 +816,10 @@ base::FilePath ProfileImpl::GetPrefFilePath() {
net::URLRequestContextGetter* ProfileImpl::CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers) {
- return io_data_.CreateMainRequestContextGetter(
- protocol_handlers,
- g_browser_process->local_state(),
- g_browser_process->io_thread());
+ return io_data_
+ .CreateMainRequestContextGetter(protocol_handlers,
+ g_browser_process->local_state(),
+ g_browser_process->io_thread()).get();
}
net::URLRequestContextGetter* ProfileImpl::GetRequestContext() {
@@ -836,7 +836,7 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
net::URLRequestContextGetter* ProfileImpl::GetMediaRequestContext() {
// Return the default media context.
- return io_data_.GetMediaRequestContextGetter();
+ return io_data_.GetMediaRequestContextGetter().get();
}
net::URLRequestContextGetter*
@@ -853,8 +853,8 @@ net::URLRequestContextGetter*
ProfileImpl::GetMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) {
- return io_data_.GetIsolatedMediaRequestContextGetter(partition_path,
- in_memory);
+ return io_data_
+ .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get();
}
content::ResourceContext* ProfileImpl::GetResourceContext() {
@@ -862,7 +862,7 @@ content::ResourceContext* ProfileImpl::GetResourceContext() {
}
net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() {
- return io_data_.GetExtensionsRequestContextGetter();
+ return io_data_.GetExtensionsRequestContextGetter().get();
}
net::URLRequestContextGetter*
@@ -871,7 +871,7 @@ ProfileImpl::CreateRequestContextForStoragePartition(
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) {
return io_data_.CreateIsolatedAppRequestContextGetter(
- partition_path, in_memory, protocol_handlers);
+ partition_path, in_memory, protocol_handlers).get();
}
net::SSLConfigService* ProfileImpl::GetSSLConfigService() {
@@ -900,7 +900,7 @@ content::GeolocationPermissionContext*
content::SpeechRecognitionPreferences*
ProfileImpl::GetSpeechRecognitionPreferences() {
#if defined(ENABLE_INPUT_SPEECH)
- return ChromeSpeechRecognitionPreferences::GetForProfile(this);
+ return ChromeSpeechRecognitionPreferences::GetForProfile(this).get();
#else
return NULL;
#endif
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698