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

Side by Side Diff: content/browser/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: fix ifndefs 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
« no previous file with comments | « content/browser/resource_context.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/resource_context.h" 5 #include "content/browser/resource_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/plugin_process_host.h" 8 #include "content/browser/plugin_process_host.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "webkit/database/database_tracker.h" 10 #include "webkit/database/database_tracker.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 146 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
147 EnsureInitialized(); 147 EnsureInitialized();
148 return media_observer_; 148 return media_observer_;
149 } 149 }
150 150
151 void ResourceContext::set_media_observer(MediaObserver* media_observer) { 151 void ResourceContext::set_media_observer(MediaObserver* media_observer) {
152 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 152 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
153 media_observer_ = media_observer; 153 media_observer_ = media_observer;
154 } 154 }
155 155
156 const DownloadManager::GetNextIdThunkType& 156 DownloadIdFactory* ResourceContext::download_id_factory() const {
157 ResourceContext::next_download_id_thunk() const {
158 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 157 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
159 EnsureInitialized(); 158 EnsureInitialized();
160 return next_download_id_thunk_; 159 return download_id_factory_;
161 } 160 }
162 void ResourceContext::set_next_download_id_thunk( 161 void ResourceContext::set_download_id_factory(
163 const DownloadManager::GetNextIdThunkType& thunk) { 162 DownloadIdFactory* download_id_factory) {
164 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
165 next_download_id_thunk_ = thunk; 164 download_id_factory_ = download_id_factory;
166 } 165 }
167 166
168 media_stream::MediaStreamManager* 167 media_stream::MediaStreamManager*
169 ResourceContext::media_stream_manager() const { 168 ResourceContext::media_stream_manager() const {
170 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 169 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
171 EnsureInitialized(); 170 EnsureInitialized();
172 return media_stream_manager_; 171 return media_stream_manager_;
173 } 172 }
174 173
175 void ResourceContext::set_media_stream_manager( 174 void ResourceContext::set_media_stream_manager(
176 media_stream::MediaStreamManager* media_stream_manager) { 175 media_stream::MediaStreamManager* media_stream_manager) {
177 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 176 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
178 media_stream_manager_ = media_stream_manager; 177 media_stream_manager_ = media_stream_manager;
179 } 178 }
180 179
181 } // namespace content 180 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/resource_context.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698