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

Side by Side Diff: chrome/browser/in_process_webkit/dom_storage_context.h

Issue 560024: Reland 37913. Clear local state on exit. (Closed)
Patch Set: Created 10 years, 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // source code is governed by a BSD-style license that can be found in the 2 // Use of this source code is governed by a BSD-style license that can be
3 // LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_
6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ 6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 13
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // Deletes all local storage files. 72 // Deletes all local storage files.
73 void DeleteAllLocalStorageFiles(); 73 void DeleteAllLocalStorageFiles();
74 74
75 // The local storage directory. 75 // The local storage directory.
76 static const FilePath::CharType kLocalStorageDirectory[]; 76 static const FilePath::CharType kLocalStorageDirectory[];
77 77
78 // The local storage file extension. 78 // The local storage file extension.
79 static const FilePath::CharType kLocalStorageExtension[]; 79 static const FilePath::CharType kLocalStorageExtension[];
80 80
81 // Delete all non-extension local storage files.
82 static void ClearLocalState(const FilePath& profile_path,
83 const char* url_scheme_to_be_skipped);
84
81 private: 85 private:
82 // Get the local storage instance. The object is owned by this class. 86 // Get the local storage instance. The object is owned by this class.
83 DOMStorageNamespace* CreateLocalStorage(); 87 DOMStorageNamespace* CreateLocalStorage();
84 88
85 // Get a new session storage namespace. The object is owned by this class. 89 // Get a new session storage namespace. The object is owned by this class.
86 DOMStorageNamespace* CreateSessionStorage(int64 namespace_id); 90 DOMStorageNamespace* CreateSessionStorage(int64 namespace_id);
87 91
88 // Used internally to register storage namespaces we create. 92 // Used internally to register storage namespaces we create.
89 void RegisterStorageNamespace(DOMStorageNamespace* storage_namespace); 93 void RegisterStorageNamespace(DOMStorageNamespace* storage_namespace);
90 94
(...skipping 26 matching lines...) Expand all
117 StorageAreaMap storage_area_map_; 121 StorageAreaMap storage_area_map_;
118 122
119 // Maps ids to StorageNamespaces. We own these objects. 123 // Maps ids to StorageNamespaces. We own these objects.
120 typedef std::map<int64, DOMStorageNamespace*> StorageNamespaceMap; 124 typedef std::map<int64, DOMStorageNamespace*> StorageNamespaceMap;
121 StorageNamespaceMap storage_namespace_map_; 125 StorageNamespaceMap storage_namespace_map_;
122 126
123 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContext); 127 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContext);
124 }; 128 };
125 129
126 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ 130 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/in_process_webkit/dom_storage_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698