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 "content/public/browser/browser_context.h" | 5 #include "content/public/browser/browser_context.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // unittests where a UI thread might not have been created. | 219 // unittests where a UI thread might not have been created. |
220 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || | 220 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || |
221 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); | 221 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); |
222 | 222 |
223 #if defined(OS_CHROMEOS) | 223 #if defined(OS_CHROMEOS) |
224 if (!context->GetUserData(kMountPointsKey)) { | 224 if (!context->GetUserData(kMountPointsKey)) { |
225 scoped_refptr<storage::ExternalMountPoints> mount_points = | 225 scoped_refptr<storage::ExternalMountPoints> mount_points = |
226 storage::ExternalMountPoints::CreateRefCounted(); | 226 storage::ExternalMountPoints::CreateRefCounted(); |
227 context->SetUserData( | 227 context->SetUserData( |
228 kMountPointsKey, | 228 kMountPointsKey, |
229 new UserDataAdapter<storage::ExternalMountPoints>(mount_points.get())); | 229 base::MakeUnique<UserDataAdapter<storage::ExternalMountPoints>>( |
| 230 mount_points.get())); |
230 } | 231 } |
231 | 232 |
232 return UserDataAdapter<storage::ExternalMountPoints>::Get(context, | 233 return UserDataAdapter<storage::ExternalMountPoints>::Get(context, |
233 kMountPointsKey); | 234 kMountPointsKey); |
234 #else | 235 #else |
235 return NULL; | 236 return NULL; |
236 #endif | 237 #endif |
237 } | 238 } |
238 | 239 |
239 // static | 240 // static |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 base::Base64Encode(base::RandBytesAsString(16), &salt); | 565 base::Base64Encode(base::RandBytesAsString(16), &salt); |
565 DCHECK(!salt.empty()); | 566 DCHECK(!salt.empty()); |
566 return salt; | 567 return salt; |
567 } | 568 } |
568 | 569 |
569 BrowsingDataRemoverDelegate* BrowserContext::GetBrowsingDataRemoverDelegate() { | 570 BrowsingDataRemoverDelegate* BrowserContext::GetBrowsingDataRemoverDelegate() { |
570 return nullptr; | 571 return nullptr; |
571 } | 572 } |
572 | 573 |
573 } // namespace content | 574 } // namespace content |
OLD | NEW |