| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/in_process_webkit/storage_namespace.h" | 5 #include "chrome/browser/in_process_webkit/storage_namespace.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "chrome/browser/in_process_webkit/dom_storage_context.h" | 8 #include "chrome/browser/in_process_webkit/dom_storage_context.h" |
| 9 #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" | 9 #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" |
| 10 #include "chrome/browser/in_process_webkit/storage_area.h" | 10 #include "chrome/browser/in_process_webkit/storage_area.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 return storage_namespace_->createStorageArea(origin); | 94 return storage_namespace_->createStorageArea(origin); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void StorageNamespace::CreateWebStorageNamespaceIfNecessary() { | 97 void StorageNamespace::CreateWebStorageNamespaceIfNecessary() { |
| 98 if (storage_namespace_.get()) | 98 if (storage_namespace_.get()) |
| 99 return; | 99 return; |
| 100 | 100 |
| 101 if (dom_storage_type_ == DOM_STORAGE_LOCAL) { | 101 if (dom_storage_type_ == DOM_STORAGE_LOCAL) { |
| 102 storage_namespace_.reset( | 102 storage_namespace_.reset( |
| 103 WebStorageNamespace::createLocalStorageNamespace(data_dir_path_, | 103 WebStorageNamespace::createLocalStorageNamespace(data_dir_path_, |
| 104 kLocalStorageQuota); | 104 kLocalStorageQuota)); |
| 105 } else { | 105 } else { |
| 106 storage_namespace_.reset( | 106 storage_namespace_.reset( |
| 107 WebStorageNamespace::createSessionStorageNamespace()); | 107 WebStorageNamespace::createSessionStorageNamespace()); |
| 108 } | 108 } |
| 109 } | 109 } |
| OLD | NEW |