| Index: content/browser/resource_context_impl.cc
|
| diff --git a/content/browser/resource_context_impl.cc b/content/browser/resource_context_impl.cc
|
| index 4a107dc9a45c9455caef31f445c4e48460d2476d..e7aa29b9570d5706018be8032db33507b15392f9 100644
|
| --- a/content/browser/resource_context_impl.cc
|
| +++ b/content/browser/resource_context_impl.cc
|
| @@ -6,11 +6,9 @@
|
|
|
| #include <stdint.h>
|
|
|
| -#include "base/base64.h"
|
| #include "base/bind.h"
|
| #include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| -#include "base/rand_util.h"
|
| #include "content/browser/blob_storage/chrome_blob_storage_context.h"
|
| #include "content/browser/loader/resource_dispatcher_host_impl.h"
|
| #include "content/browser/loader/resource_request_info_impl.h"
|
| @@ -25,13 +23,22 @@
|
|
|
| namespace content {
|
|
|
| +namespace {
|
| +
|
| // Key names on ResourceContext.
|
| const char kBlobStorageContextKeyName[] = "content_blob_storage_context";
|
| const char kStreamContextKeyName[] = "content_stream_context";
|
| const char kURLDataManagerBackendKeyName[] = "url_data_manager_backend";
|
|
|
| -ResourceContext::ResourceContext()
|
| - : media_device_id_salt_(CreateRandomMediaDeviceIDSalt()) {
|
| +// Used by the default implementation of GetMediaDeviceIDSalt, below.
|
| +std::string ReturnEmptySalt() {
|
| + return std::string();
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +
|
| +ResourceContext::ResourceContext() {
|
| ResourceDispatcherHostImpl* rdhi = ResourceDispatcherHostImpl::Get();
|
| if (rdhi) {
|
| BrowserThread::PostTask(
|
| @@ -52,8 +59,8 @@
|
| DetachUserDataThread();
|
| }
|
|
|
| -std::string ResourceContext::GetMediaDeviceIDSalt() {
|
| - return media_device_id_salt_;
|
| +ResourceContext::SaltCallback ResourceContext::GetMediaDeviceIDSalt() {
|
| + return base::Bind(&ReturnEmptySalt);
|
| }
|
|
|
| std::unique_ptr<net::ClientCertStore> ResourceContext::CreateClientCertStore() {
|
| @@ -67,14 +74,6 @@
|
| const base::Callback<void(std::unique_ptr<net::KeygenHandler>)>& callback) {
|
| callback.Run(base::WrapUnique(
|
| new net::KeygenHandler(key_size_in_bits, challenge_string, url)));
|
| -}
|
| -
|
| -// static
|
| -std::string ResourceContext::CreateRandomMediaDeviceIDSalt() {
|
| - std::string salt;
|
| - base::Base64Encode(base::RandBytesAsString(16), &salt);
|
| - DCHECK(!salt.empty());
|
| - return salt;
|
| }
|
|
|
| ChromeBlobStorageContext* GetChromeBlobStorageContextForResourceContext(
|
|
|