OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "content/browser/in_process_webkit/dom_storage_context.h" | 5 #include "content/browser/in_process_webkit/dom_storage_context.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 12 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
13 #include "chrome/common/dom_storage_common.h" | |
14 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
15 #include "content/browser/browser_thread.h" | 14 #include "content/browser/browser_thread.h" |
16 #include "content/browser/in_process_webkit/dom_storage_area.h" | 15 #include "content/browser/in_process_webkit/dom_storage_area.h" |
17 #include "content/browser/in_process_webkit/dom_storage_namespace.h" | 16 #include "content/browser/in_process_webkit/dom_storage_namespace.h" |
18 #include "content/browser/in_process_webkit/webkit_context.h" | 17 #include "content/browser/in_process_webkit/webkit_context.h" |
| 18 #include "content/common/dom_storage_common.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
21 #include "webkit/glue/webkit_glue.h" | 21 #include "webkit/glue/webkit_glue.h" |
22 #include "webkit/quota/special_storage_policy.h" | 22 #include "webkit/quota/special_storage_policy.h" |
23 | 23 |
24 using WebKit::WebSecurityOrigin; | 24 using WebKit::WebSecurityOrigin; |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 void ClearLocalState(const FilePath& domstorage_path) { | 28 void ClearLocalState(const FilePath& domstorage_path) { |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 } | 274 } |
275 | 275 |
276 FilePath DOMStorageContext::GetLocalStorageFilePath( | 276 FilePath DOMStorageContext::GetLocalStorageFilePath( |
277 const string16& origin_id) const { | 277 const string16& origin_id) const { |
278 FilePath storageDir = data_path_.Append( | 278 FilePath storageDir = data_path_.Append( |
279 DOMStorageContext::kLocalStorageDirectory); | 279 DOMStorageContext::kLocalStorageDirectory); |
280 FilePath::StringType id = | 280 FilePath::StringType id = |
281 webkit_glue::WebStringToFilePathString(origin_id); | 281 webkit_glue::WebStringToFilePathString(origin_id); |
282 return storageDir.Append(id.append(kLocalStorageExtension)); | 282 return storageDir.Append(id.append(kLocalStorageExtension)); |
283 } | 283 } |
OLD | NEW |