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

Side by Side Diff: content/browser/cache_storage/cache_storage_dispatcher_host.h

Issue 1111713002: CacheStorage: [Retry] Merge CacheStorageListener into CacheStorageDispatcherHost (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layouttest failures Created 5 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
« no previous file with comments | « no previous file | content/browser/cache_storage/cache_storage_dispatcher_host.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_
7 7
8 #include "content/browser/cache_storage/cache_storage.h"
8 #include "content/public/browser/browser_message_filter.h" 9 #include "content/public/browser/browser_message_filter.h"
9 10
10 namespace content { 11 namespace content {
11 12
12 class CacheStorageContextImpl; 13 class CacheStorageContextImpl;
13 class CacheStorageListener; 14 class CacheStorageListener;
14 15
15 // Handles Cache Storage related messages sent to the browser process from 16 // Handles Cache Storage related messages sent to the browser process from
16 // child processes. One host instance exists per child process. All 17 // child processes. One host instance exists per child process. All
17 // messages are processed on the IO thread. Currently, all messages are 18 // messages are processed on the IO thread. Currently, all messages are
(...skipping 15 matching lines...) Expand all
33 private: 34 private:
34 // Friends to allow OnDestruct() delegation 35 // Friends to allow OnDestruct() delegation
35 friend class BrowserThread; 36 friend class BrowserThread;
36 friend class base::DeleteHelper<CacheStorageDispatcherHost>; 37 friend class base::DeleteHelper<CacheStorageDispatcherHost>;
37 38
38 ~CacheStorageDispatcherHost() override; 39 ~CacheStorageDispatcherHost() override;
39 40
40 // Called by Init() on IO thread. 41 // Called by Init() on IO thread.
41 void CreateCacheListener(CacheStorageContextImpl* context); 42 void CreateCacheListener(CacheStorageContextImpl* context);
42 43
44 // The message receiver functions for the CacheStorage API:
45 void OnCacheStorageHas(int thread_id,
46 int request_id,
47 const GURL& origin,
48 const base::string16& cache_name);
49 void OnCacheStorageOpen(int thread_id,
50 int request_id,
51 const GURL& origin,
52 const base::string16& cache_name);
53 void OnCacheStorageDelete(int thread_id,
54 int request_id,
55 const GURL& origin,
56 const base::string16& cache_name);
57 void OnCacheStorageKeys(int thread_id, int request_id, const GURL& origin);
58 void OnCacheStorageMatch(int thread_id,
59 int request_id,
60 const GURL& origin,
61 const ServiceWorkerFetchRequest& request,
62 const CacheStorageCacheQueryParams& match_params);
63
64 // CacheStorageManager callbacks
65 void OnCacheStorageHasCallback(int thread_id,
66 int request_id,
67 bool has_cache,
68 CacheStorage::CacheStorageError error);
69 void OnCacheStorageOpenCallback(int thread_id,
70 int request_id,
71 const scoped_refptr<CacheStorageCache>& cache,
72 CacheStorage::CacheStorageError error);
73 void OnCacheStorageDeleteCallback(int thread_id,
74 int request_id,
75 bool deleted,
76 CacheStorage::CacheStorageError error);
77 void OnCacheStorageKeysCallback(int thread_id,
78 int request_id,
79 const std::vector<std::string>& strings,
80 CacheStorage::CacheStorageError error);
81 void OnCacheStorageMatchCallback(
82 int thread_id,
83 int request_id,
84 CacheStorageCache::ErrorType error,
85 scoped_ptr<ServiceWorkerResponse> response,
86 scoped_ptr<storage::BlobDataHandle> blob_data_handle);
87
43 scoped_ptr<CacheStorageListener> cache_listener_; 88 scoped_ptr<CacheStorageListener> cache_listener_;
89 scoped_refptr<CacheStorageContextImpl> context_;
44 90
45 DISALLOW_COPY_AND_ASSIGN(CacheStorageDispatcherHost); 91 DISALLOW_COPY_AND_ASSIGN(CacheStorageDispatcherHost);
46 }; 92 };
47 93
48 } // namespace content 94 } // namespace content
49 95
50 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_ 96 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/cache_storage/cache_storage_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698