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

Side by Side Diff: content/browser/dom_storage/dom_storage_message_filter.h

Issue 10383123: Switch to using the async DomStorage IPC messages and add a caching layer … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_message_filter.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_ 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_ 6 #define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual base::TaskRunner* OverrideTaskRunnerForMessage( 43 virtual base::TaskRunner* OverrideTaskRunnerForMessage(
44 const IPC::Message& message) OVERRIDE; 44 const IPC::Message& message) OVERRIDE;
45 virtual bool OnMessageReceived(const IPC::Message& message, 45 virtual bool OnMessageReceived(const IPC::Message& message,
46 bool* message_was_ok) OVERRIDE; 46 bool* message_was_ok) OVERRIDE;
47 47
48 // Message Handlers. 48 // Message Handlers.
49 void OnOpenStorageArea(int connection_id, int64 namespace_id, 49 void OnOpenStorageArea(int connection_id, int64 namespace_id,
50 const GURL& origin); 50 const GURL& origin);
51 void OnCloseStorageArea(int connection_id); 51 void OnCloseStorageArea(int connection_id);
52 void OnLoadStorageArea(int connection_id, dom_storage::ValuesMap* map); 52 void OnLoadStorageArea(int connection_id, dom_storage::ValuesMap* map);
53 void OnLength(int connection_id, unsigned* length);
54 void OnKey(int connection_id, unsigned index, NullableString16* key);
55 void OnGetItem(int connection_id, const string16& key,
56 NullableString16* value);
57 void OnSetItem(int connection_id, const string16& key, 53 void OnSetItem(int connection_id, const string16& key,
58 const string16& value, const GURL& page_url, 54 const string16& value, const GURL& page_url);
59 WebKit::WebStorageArea::Result* result,
60 NullableString16* old_value);
61 void OnSetItemAsync(int connection_id, int operation_id, const string16& key,
62 const string16& value, const GURL& page_url);
63
64 void OnRemoveItem(int connection_id, const string16& key, 55 void OnRemoveItem(int connection_id, const string16& key,
65 const GURL& page_url, NullableString16* old_value); 56 const GURL& page_url);
66 void OnRemoveItemAsync(int connection_id, int operation_id, 57 void OnClear(int connection_id, const GURL& page_url);
67 const string16& key, const GURL& page_url); 58 void OnFlushMessages();
68 void OnClear(int connection_id, const GURL& url, bool* something_cleared);
69 void OnClearAsync(int connection_id, int operation_id, const GURL& page_url);
70 59
71 // DomStorageContext::EventObserver implementation which 60 // DomStorageContext::EventObserver implementation which
72 // sends events back to our renderer process. 61 // sends events back to our renderer process.
73 virtual void OnDomStorageItemSet( 62 virtual void OnDomStorageItemSet(
74 const dom_storage::DomStorageArea* area, 63 const dom_storage::DomStorageArea* area,
75 const string16& key, 64 const string16& key,
76 const string16& new_value, 65 const string16& new_value,
77 const NullableString16& old_value, 66 const NullableString16& old_value,
78 const GURL& page_url) OVERRIDE; 67 const GURL& page_url) OVERRIDE;
79 virtual void OnDomStorageItemRemoved( 68 virtual void OnDomStorageItemRemoved(
(...skipping 13 matching lines...) Expand all
93 const NullableString16& old_value); 82 const NullableString16& old_value);
94 83
95 scoped_refptr<dom_storage::DomStorageContext> context_; 84 scoped_refptr<dom_storage::DomStorageContext> context_;
96 scoped_ptr<dom_storage::DomStorageHost> host_; 85 scoped_ptr<dom_storage::DomStorageHost> host_;
97 int connection_dispatching_message_for_; 86 int connection_dispatching_message_for_;
98 87
99 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageMessageFilter); 88 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageMessageFilter);
100 }; 89 };
101 90
102 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_ 91 #endif // CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698