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

Side by Side Diff: content/browser/in_process_webkit/dom_storage_context.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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
OLDNEW
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/in_process_webkit/dom_storage_area.h" 13 #include "content/browser/in_process_webkit/dom_storage_area.h"
14 #include "content/browser/in_process_webkit/dom_storage_namespace.h" 14 #include "content/browser/in_process_webkit/dom_storage_namespace.h"
15 #include "content/browser/in_process_webkit/webkit_context.h" 15 #include "content/browser/in_process_webkit/webkit_context.h"
16 #include "content/common/dom_storage_common.h" 16 #include "content/common/dom_storage_common.h"
17 #include "content/public/browser/browser_thread.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 content::BrowserThread;
24
23 using WebKit::WebSecurityOrigin; 25 using WebKit::WebSecurityOrigin;
24 26
25 namespace { 27 namespace {
26 28
27 void ClearLocalState(const FilePath& domstorage_path, 29 void ClearLocalState(const FilePath& domstorage_path,
28 quota::SpecialStoragePolicy* special_storage_policy) { 30 quota::SpecialStoragePolicy* special_storage_policy) {
29 file_util::FileEnumerator file_enumerator( 31 file_util::FileEnumerator file_enumerator(
30 domstorage_path, false, file_util::FileEnumerator::FILES); 32 domstorage_path, false, file_util::FileEnumerator::FILES);
31 for (FilePath file_path = file_enumerator.Next(); !file_path.empty(); 33 for (FilePath file_path = file_enumerator.Next(); !file_path.empty();
32 file_path = file_enumerator.Next()) { 34 file_path = file_enumerator.Next()) {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 296 }
295 297
296 FilePath DOMStorageContext::GetLocalStorageFilePath( 298 FilePath DOMStorageContext::GetLocalStorageFilePath(
297 const string16& origin_id) const { 299 const string16& origin_id) const {
298 FilePath storageDir = data_path_.Append( 300 FilePath storageDir = data_path_.Append(
299 DOMStorageContext::kLocalStorageDirectory); 301 DOMStorageContext::kLocalStorageDirectory);
300 FilePath::StringType id = 302 FilePath::StringType id =
301 webkit_glue::WebStringToFilePathString(origin_id); 303 webkit_glue::WebStringToFilePathString(origin_id);
302 return storageDir.Append(id.append(kLocalStorageExtension)); 304 return storageDir.Append(id.append(kLocalStorageExtension));
303 } 305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698