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

Side by Side Diff: content/browser/browser_context.cc

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "content/public/browser/browser_context.h" 5 #include "content/public/browser/browser_context.h"
6 6
7 #if !defined(OS_IOS) 7 #if !defined(OS_IOS)
8 #include "content/browser/appcache/chrome_appcache_service.h" 8 #include "content/browser/appcache/chrome_appcache_service.h"
9 #include "content/browser/dom_storage/dom_storage_context_impl.h" 9 #include "content/browser/dom_storage/dom_storage_context_impl.h"
10 #include "content/browser/download/download_manager_impl.h" 10 #include "content/browser/download/download_manager_impl.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // unittests where a UI thread might not have been created. 138 // unittests where a UI thread might not have been created.
139 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || 139 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
140 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); 140 !BrowserThread::IsMessageLoopValid(BrowserThread::UI));
141 141
142 #if defined(OS_CHROMEOS) 142 #if defined(OS_CHROMEOS)
143 if (!context->GetUserData(kMountPointsKey)) { 143 if (!context->GetUserData(kMountPointsKey)) {
144 scoped_refptr<fileapi::ExternalMountPoints> mount_points = 144 scoped_refptr<fileapi::ExternalMountPoints> mount_points =
145 fileapi::ExternalMountPoints::CreateRefCounted(); 145 fileapi::ExternalMountPoints::CreateRefCounted();
146 context->SetUserData( 146 context->SetUserData(
147 kMountPointsKey, 147 kMountPointsKey,
148 new UserDataAdapter<fileapi::ExternalMountPoints>( 148 new UserDataAdapter<fileapi::ExternalMountPoints>(mount_points.get()));
149 mount_points));
150 } 149 }
151 150
152 return UserDataAdapter<fileapi::ExternalMountPoints>::Get( 151 return UserDataAdapter<fileapi::ExternalMountPoints>::Get(
153 context, kMountPointsKey); 152 context, kMountPointsKey);
154 #else 153 #else
155 return NULL; 154 return NULL;
156 #endif 155 #endif
157 } 156 }
158 157
159 StoragePartition* BrowserContext::GetStoragePartition( 158 StoragePartition* BrowserContext::GetStoragePartition(
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 #endif // !OS_IOS 265 #endif // !OS_IOS
267 266
268 BrowserContext::~BrowserContext() { 267 BrowserContext::~BrowserContext() {
269 #if !defined(OS_IOS) 268 #if !defined(OS_IOS)
270 if (GetUserData(kDownloadManagerKeyName)) 269 if (GetUserData(kDownloadManagerKeyName))
271 GetDownloadManager(this)->Shutdown(); 270 GetDownloadManager(this)->Shutdown();
272 #endif 271 #endif
273 } 272 }
274 273
275 } // namespace content 274 } // namespace content
OLDNEW
« no previous file with comments | « chromeos/process_proxy/process_proxy.cc ('k') | content/browser/renderer_host/image_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698