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

Side by Side Diff: third_party/WebKit/Source/modules/storage/StorageArea.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All Rights Reserved. 2 * Copyright (C) 2009 Google Inc. All Rights Reserved.
3 * (C) 2008 Apple Inc. 3 * (C) 2008 Apple Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 25 matching lines...) Expand all
36 #include "modules/storage/InspectorDOMStorageAgent.h" 36 #include "modules/storage/InspectorDOMStorageAgent.h"
37 #include "modules/storage/Storage.h" 37 #include "modules/storage/Storage.h"
38 #include "modules/storage/StorageClient.h" 38 #include "modules/storage/StorageClient.h"
39 #include "modules/storage/StorageEvent.h" 39 #include "modules/storage/StorageEvent.h"
40 #include "modules/storage/StorageNamespace.h" 40 #include "modules/storage/StorageNamespace.h"
41 #include "modules/storage/StorageNamespaceController.h" 41 #include "modules/storage/StorageNamespaceController.h"
42 #include "platform/weborigin/SecurityOrigin.h" 42 #include "platform/weborigin/SecurityOrigin.h"
43 #include "public/platform/WebStorageArea.h" 43 #include "public/platform/WebStorageArea.h"
44 #include "public/platform/WebString.h" 44 #include "public/platform/WebString.h"
45 #include "public/platform/WebURL.h" 45 #include "public/platform/WebURL.h"
46 #include <memory>
46 47
47 namespace blink { 48 namespace blink {
48 49
49 StorageArea* StorageArea::create(PassOwnPtr<WebStorageArea> storageArea, Storage Type storageType) 50 StorageArea* StorageArea::create(std::unique_ptr<WebStorageArea> storageArea, St orageType storageType)
50 { 51 {
51 return new StorageArea(std::move(storageArea), storageType); 52 return new StorageArea(std::move(storageArea), storageType);
52 } 53 }
53 54
54 StorageArea::StorageArea(PassOwnPtr<WebStorageArea> storageArea, StorageType sto rageType) 55 StorageArea::StorageArea(std::unique_ptr<WebStorageArea> storageArea, StorageTyp e storageType)
55 : LocalFrameLifecycleObserver(nullptr) 56 : LocalFrameLifecycleObserver(nullptr)
56 , m_storageArea(std::move(storageArea)) 57 , m_storageArea(std::move(storageArea))
57 , m_storageType(storageType) 58 , m_storageType(storageType)
58 , m_canAccessStorageCachedResult(false) 59 , m_canAccessStorageCachedResult(false)
59 { 60 {
60 } 61 }
61 62
62 StorageArea::~StorageArea() 63 StorageArea::~StorageArea()
63 { 64 {
64 } 65 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 localFrame->localDOMWindow()->enqueueWindowEvent(StorageEvent::creat e(EventTypeNames::storage, key, oldValue, newValue, pageURL, storage)); 203 localFrame->localDOMWindow()->enqueueWindowEvent(StorageEvent::creat e(EventTypeNames::storage, key, oldValue, newValue, pageURL, storage));
203 } 204 }
204 if (InspectorDOMStorageAgent* agent = StorageNamespaceController::from(page) ->inspectorAgent()) 205 if (InspectorDOMStorageAgent* agent = StorageNamespaceController::from(page) ->inspectorAgent())
205 agent->didDispatchDOMStorageEvent(key, oldValue, newValue, SessionStorag e, securityOrigin); 206 agent->didDispatchDOMStorageEvent(key, oldValue, newValue, SessionStorag e, securityOrigin);
206 } 207 }
207 208
208 bool StorageArea::isEventSource(Storage* storage, WebStorageArea* sourceAreaInst ance) 209 bool StorageArea::isEventSource(Storage* storage, WebStorageArea* sourceAreaInst ance)
209 { 210 {
210 ASSERT(storage); 211 ASSERT(storage);
211 StorageArea* area = storage->area(); 212 StorageArea* area = storage->area();
212 return area->m_storageArea == sourceAreaInstance; 213 return area->m_storageArea.get() == sourceAreaInstance;
213 } 214 }
214 215
215 } // namespace blink 216 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/storage/StorageArea.h ('k') | third_party/WebKit/Source/modules/storage/StorageClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698