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

Side by Side Diff: content/browser/service_worker/service_worker_context_wrapper.h

Issue 279683002: Initialize ServiceWorkerContextCore with a message loop for the disk cache to use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "content/browser/service_worker/service_worker_context_core.h" 13 #include "content/browser/service_worker/service_worker_context_core.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/public/browser/service_worker_context.h" 15 #include "content/public/browser/service_worker_context.h"
16 16
17 namespace base { 17 namespace base {
18 class FilePath; 18 class FilePath;
19 class MessageLoopProxy;
19 class SequencedTaskRunner; 20 class SequencedTaskRunner;
20 } 21 }
21 22
22 namespace quota { 23 namespace quota {
23 class QuotaManagerProxy; 24 class QuotaManagerProxy;
24 } 25 }
25 26
26 namespace content { 27 namespace content {
27 28
28 class BrowserContext; 29 class BrowserContext;
(...skipping 30 matching lines...) Expand all
59 60
60 void AddObserver(ServiceWorkerContextObserver* observer); 61 void AddObserver(ServiceWorkerContextObserver* observer);
61 void RemoveObserver(ServiceWorkerContextObserver* observer); 62 void RemoveObserver(ServiceWorkerContextObserver* observer);
62 63
63 private: 64 private:
64 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; 65 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>;
65 friend class EmbeddedWorkerTestHelper; 66 friend class EmbeddedWorkerTestHelper;
66 friend class ServiceWorkerProcessManager; 67 friend class ServiceWorkerProcessManager;
67 virtual ~ServiceWorkerContextWrapper(); 68 virtual ~ServiceWorkerContextWrapper();
68 69
69 void InitForTesting(const base::FilePath& user_data_directory,
70 base::SequencedTaskRunner* database_task_runner,
71 quota::QuotaManagerProxy* quota_manager_proxy);
72 void InitInternal(const base::FilePath& user_data_directory, 70 void InitInternal(const base::FilePath& user_data_directory,
73 base::SequencedTaskRunner* database_task_runner, 71 base::SequencedTaskRunner* database_task_runner,
72 base::MessageLoopProxy* disk_cache_thread,
74 quota::QuotaManagerProxy* quota_manager_proxy); 73 quota::QuotaManagerProxy* quota_manager_proxy);
75 74
76 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> > 75 const scoped_refptr<ObserverListThreadSafe<ServiceWorkerContextObserver> >
77 observer_list_; 76 observer_list_;
78 // Cleared in Shutdown(): 77 // Cleared in Shutdown():
79 BrowserContext* browser_context_; 78 BrowserContext* browser_context_;
80 scoped_ptr<ServiceWorkerContextCore> context_core_; 79 scoped_ptr<ServiceWorkerContextCore> context_core_;
81 }; 80 };
82 81
83 } // namespace content 82 } // namespace content
84 83
85 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 84 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698