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

Side by Side Diff: Source/modules/storage/StorageNamespace.cpp

Issue 1055133003: Oilpan: have Storage objects reside on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: trivial cl footprint reduction Created 5 years, 8 months 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All Rights Reserved. 2 * Copyright (C) 2009 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 26 matching lines...) Expand all
37 37
38 StorageNamespace::StorageNamespace(PassOwnPtr<WebStorageNamespace> webStorageNam espace) 38 StorageNamespace::StorageNamespace(PassOwnPtr<WebStorageNamespace> webStorageNam espace)
39 : m_webStorageNamespace(webStorageNamespace) 39 : m_webStorageNamespace(webStorageNamespace)
40 { 40 {
41 } 41 }
42 42
43 StorageNamespace::~StorageNamespace() 43 StorageNamespace::~StorageNamespace()
44 { 44 {
45 } 45 }
46 46
47 PassOwnPtrWillBeRawPtr<StorageArea> StorageNamespace::localStorageArea(SecurityO rigin* origin) 47 StorageArea* StorageNamespace::localStorageArea(SecurityOrigin* origin)
48 { 48 {
49 ASSERT(isMainThread()); 49 ASSERT(isMainThread());
50 static WebStorageNamespace* localStorageNamespace = nullptr; 50 static WebStorageNamespace* localStorageNamespace = nullptr;
51 if (!localStorageNamespace) 51 if (!localStorageNamespace)
52 localStorageNamespace = Platform::current()->createLocalStorageNamespace (); 52 localStorageNamespace = Platform::current()->createLocalStorageNamespace ();
53 return StorageArea::create(adoptPtr(localStorageNamespace->createStorageArea (origin->toString())), LocalStorage); 53 return StorageArea::create(adoptPtr(localStorageNamespace->createStorageArea (origin->toString())), LocalStorage);
54 } 54 }
55 55
56 PassOwnPtrWillBeRawPtr<StorageArea> StorageNamespace::storageArea(SecurityOrigin * origin) 56 StorageArea* StorageNamespace::storageArea(SecurityOrigin* origin)
57 { 57 {
58 return StorageArea::create(adoptPtr(m_webStorageNamespace->createStorageArea (origin->toString())), SessionStorage); 58 return StorageArea::create(adoptPtr(m_webStorageNamespace->createStorageArea (origin->toString())), SessionStorage);
59 } 59 }
60 60
61 bool StorageNamespace::isSameNamespace(const WebStorageNamespace& sessionNamespa ce) const 61 bool StorageNamespace::isSameNamespace(const WebStorageNamespace& sessionNamespa ce) const
62 { 62 {
63 return m_webStorageNamespace && m_webStorageNamespace->isSameNamespace(sessi onNamespace); 63 return m_webStorageNamespace && m_webStorageNamespace->isSameNamespace(sessi onNamespace);
64 } 64 }
65 65
66 } // namespace blink 66 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698