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_area.h" | 5 #include "chrome/browser/in_process_webkit/storage_area.h" |
6 | 6 |
7 #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" | 7 #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" |
8 #include "chrome/browser/in_process_webkit/storage_namespace.h" | 8 #include "chrome/browser/in_process_webkit/storage_namespace.h" |
9 #include "webkit/api/public/WebStorageArea.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" |
10 #include "webkit/api/public/WebString.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
11 #include "webkit/api/public/WebURL.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
12 | 12 |
13 using WebKit::WebStorageArea; | 13 using WebKit::WebStorageArea; |
14 using WebKit::WebURL; | 14 using WebKit::WebURL; |
15 | 15 |
16 StorageArea::StorageArea(const string16& origin, | 16 StorageArea::StorageArea(const string16& origin, |
17 int64 id, | 17 int64 id, |
18 StorageNamespace* owner) | 18 StorageNamespace* owner) |
19 : origin_(origin), | 19 : origin_(origin), |
20 id_(id), | 20 id_(id), |
21 owner_(owner) { | 21 owner_(owner) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 } | 57 } |
58 | 58 |
59 void StorageArea::PurgeMemory() { | 59 void StorageArea::PurgeMemory() { |
60 storage_area_.reset(); | 60 storage_area_.reset(); |
61 } | 61 } |
62 | 62 |
63 void StorageArea::CreateWebStorageAreaIfNecessary() { | 63 void StorageArea::CreateWebStorageAreaIfNecessary() { |
64 if (!storage_area_.get()) | 64 if (!storage_area_.get()) |
65 storage_area_.reset(owner_->CreateWebStorageArea(origin_)); | 65 storage_area_.reset(owner_->CreateWebStorageArea(origin_)); |
66 } | 66 } |
OLD | NEW |