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

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

Issue 1864243004: Remove RawPtr from Source/modules Part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 StorageArea* InspectorDOMStorageAgent::findStorageArea(ErrorString* errorString, PassOwnPtr<protocol::DOMStorage::StorageId> storageId, LocalFrame*& targetFrame ) 194 StorageArea* InspectorDOMStorageAgent::findStorageArea(ErrorString* errorString, PassOwnPtr<protocol::DOMStorage::StorageId> storageId, LocalFrame*& targetFrame )
195 { 195 {
196 String securityOrigin = storageId->getSecurityOrigin(); 196 String securityOrigin = storageId->getSecurityOrigin();
197 bool isLocalStorage = storageId->getIsLocalStorage(); 197 bool isLocalStorage = storageId->getIsLocalStorage();
198 198
199 if (!m_page->mainFrame()->isLocalFrame()) 199 if (!m_page->mainFrame()->isLocalFrame())
200 return nullptr; 200 return nullptr;
201 201
202 RawPtr<InspectedFrames> inspectedFrames = InspectedFrames::create(m_page->de precatedLocalMainFrame()); 202 InspectedFrames* inspectedFrames = InspectedFrames::create(m_page->deprecate dLocalMainFrame());
203 LocalFrame* frame = inspectedFrames->frameWithSecurityOrigin(securityOrigin) ; 203 LocalFrame* frame = inspectedFrames->frameWithSecurityOrigin(securityOrigin) ;
204 if (!frame) { 204 if (!frame) {
205 if (errorString) 205 if (errorString)
206 *errorString = "LocalFrame not found for the given security origin"; 206 *errorString = "LocalFrame not found for the given security origin";
207 return nullptr; 207 return nullptr;
208 } 208 }
209 targetFrame = frame; 209 targetFrame = frame;
210 210
211 if (isLocalStorage) 211 if (isLocalStorage)
212 return StorageNamespace::localStorageArea(frame->document()->getSecurity Origin()); 212 return StorageNamespace::localStorageArea(frame->document()->getSecurity Origin());
213 StorageNamespace* sessionStorage = StorageNamespaceController::from(m_page)- >sessionStorage(); 213 StorageNamespace* sessionStorage = StorageNamespaceController::from(m_page)- >sessionStorage();
214 if (!sessionStorage) { 214 if (!sessionStorage) {
215 if (errorString) 215 if (errorString)
216 *errorString = "SessionStorage is not supported"; 216 *errorString = "SessionStorage is not supported";
217 return nullptr; 217 return nullptr;
218 } 218 }
219 return sessionStorage->storageArea(frame->document()->getSecurityOrigin()); 219 return sessionStorage->storageArea(frame->document()->getSecurityOrigin());
220 } 220 }
221 221
222 } // namespace blink 222 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698