 Chromium Code Reviews
 Chromium Code Reviews Issue 6825038:
  Create a content::ResourceContext.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 6825038:
  Create a content::ResourceContext.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: content/browser/resource_context.cc | 
| diff --git a/content/browser/resource_context.cc b/content/browser/resource_context.cc | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..52397772f3aa0acc753d78c1e056b9912e1bfc6e | 
| --- /dev/null | 
| +++ b/content/browser/resource_context.cc | 
| @@ -0,0 +1,31 @@ | 
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#include "content/browser/resource_context.h" | 
| + | 
| +#include "base/logging.h" | 
| +#include "content/browser/browser_thread.h" | 
| +#include "webkit/database/database_tracker.h" | 
| + | 
| +namespace content { | 
| + | 
| +ResourceContext::ResourceContext() { | 
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 
| +} | 
| + | 
| +ResourceContext::~ResourceContext() {} | 
| 
eroman
2011/04/15 03:05:27
Is the death thread well-defined? Can you add a DC
 
willchan no longer on Chromium
2011/04/15 16:58:02
It's almost always on the IO thread, but if Profil
 | 
| + | 
| +webkit_database::DatabaseTracker* ResourceContext::database_tracker() const { | 
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 
| + EnsureInitialized(); | 
| + return database_tracker_; | 
| +} | 
| + | 
| +void ResourceContext::set_database_tracker( | 
| + webkit_database::DatabaseTracker* database_tracker) { | 
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 
| + database_tracker_ = database_tracker; | 
| +} | 
| + | 
| +} // namespace content |