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

Side by Side Diff: content/shell/shell_resource_context.cc

Issue 8401001: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: " Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/shell/shell_resource_context.h" 5 #include "content/shell/shell_resource_context.h"
6 6
7 #include "content/browser/chrome_blob_storage_context.h" 7 #include "content/browser/chrome_blob_storage_context.h"
8 #include "content/shell/shell_url_request_context_getter.h" 8 #include "content/shell/shell_url_request_context_getter.h"
9 #include "content/browser/download/download_id_factory.h"
Miranda Callahan 2011/10/27 17:00:19 nit alpha
benjhayden 2011/10/27 19:04:41 Done.
9 10
10 namespace content { 11 namespace content {
11 12
12 ShellResourceContext::ShellResourceContext( 13 ShellResourceContext::ShellResourceContext(
13 ShellURLRequestContextGetter* getter, 14 ShellURLRequestContextGetter* getter,
14 ChromeBlobStorageContext* blob_storage_context, 15 ChromeBlobStorageContext* blob_storage_context,
15 DownloadManager::GetNextIdThunkType next_download_id_thunk) 16 DownloadIdFactory* download_id_factory)
16 : getter_(getter), 17 : getter_(getter),
17 blob_storage_context_(blob_storage_context), 18 blob_storage_context_(blob_storage_context),
18 next_download_id_thunk_(next_download_id_thunk) { 19 download_id_factory_(download_id_factory) {
19 } 20 }
20 21
21 ShellResourceContext::~ShellResourceContext() { 22 ShellResourceContext::~ShellResourceContext() {
22 } 23 }
23 24
24 void ShellResourceContext::EnsureInitialized() const { 25 void ShellResourceContext::EnsureInitialized() const {
25 const_cast<ShellResourceContext*>(this)->InitializeInternal(); 26 const_cast<ShellResourceContext*>(this)->InitializeInternal();
26 } 27 }
27 28
28 void ShellResourceContext::InitializeInternal() { 29 void ShellResourceContext::InitializeInternal() {
29 set_request_context(getter_->GetURLRequestContext()); 30 set_request_context(getter_->GetURLRequestContext());
30 set_host_resolver(getter_->host_resolver()); 31 set_host_resolver(getter_->host_resolver());
31 set_blob_storage_context(blob_storage_context_); 32 set_blob_storage_context(blob_storage_context_);
32 set_next_download_id_thunk(next_download_id_thunk_); 33 set_download_id_factory(download_id_factory_);
33 } 34 }
34 35
35 } // namespace content 36 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698