OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "content/browser/browser_thread.h" | |
14 #include "content/browser/in_process_webkit/dom_storage_area.h" | 13 #include "content/browser/in_process_webkit/dom_storage_area.h" |
15 #include "content/browser/in_process_webkit/dom_storage_namespace.h" | 14 #include "content/browser/in_process_webkit/dom_storage_namespace.h" |
16 #include "content/browser/in_process_webkit/webkit_context.h" | 15 #include "content/browser/in_process_webkit/webkit_context.h" |
17 #include "content/common/dom_storage_common.h" | 16 #include "content/common/dom_storage_common.h" |
| 17 #include "content/public/browser/browser_thread.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
20 #include "webkit/glue/webkit_glue.h" | 20 #include "webkit/glue/webkit_glue.h" |
21 #include "webkit/quota/special_storage_policy.h" | 21 #include "webkit/quota/special_storage_policy.h" |
22 | 22 |
23 using WebKit::WebSecurityOrigin; | 23 using WebKit::WebSecurityOrigin; |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 void ClearLocalState(const FilePath& domstorage_path, | 27 void ClearLocalState(const FilePath& domstorage_path, |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 } | 294 } |
295 | 295 |
296 FilePath DOMStorageContext::GetLocalStorageFilePath( | 296 FilePath DOMStorageContext::GetLocalStorageFilePath( |
297 const string16& origin_id) const { | 297 const string16& origin_id) const { |
298 FilePath storageDir = data_path_.Append( | 298 FilePath storageDir = data_path_.Append( |
299 DOMStorageContext::kLocalStorageDirectory); | 299 DOMStorageContext::kLocalStorageDirectory); |
300 FilePath::StringType id = | 300 FilePath::StringType id = |
301 webkit_glue::WebStringToFilePathString(origin_id); | 301 webkit_glue::WebStringToFilePathString(origin_id); |
302 return storageDir.Append(id.append(kLocalStorageExtension)); | 302 return storageDir.Append(id.append(kLocalStorageExtension)); |
303 } | 303 } |
OLD | NEW |