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

Side by Side Diff: third_party/WebKit/Source/web/StorageClientImpl.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 * 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 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #include "web/StorageClientImpl.h" 26 #include "web/StorageClientImpl.h"
27 27
28 #include "modules/storage/StorageNamespace.h" 28 #include "modules/storage/StorageNamespace.h"
29 #include "public/platform/WebStorageNamespace.h" 29 #include "public/platform/WebStorageNamespace.h"
30 #include "public/web/WebContentSettingsClient.h" 30 #include "public/web/WebContentSettingsClient.h"
31 #include "public/web/WebViewClient.h" 31 #include "public/web/WebViewClient.h"
32 #include "web/WebLocalFrameImpl.h" 32 #include "web/WebLocalFrameImpl.h"
33 #include "web/WebViewImpl.h" 33 #include "web/WebViewImpl.h"
34 #include "wtf/PtrUtil.h"
35 #include <memory>
36 34
37 namespace blink { 35 namespace blink {
38 36
39 StorageClientImpl::StorageClientImpl(WebViewImpl* webView) 37 StorageClientImpl::StorageClientImpl(WebViewImpl* webView)
40 : m_webView(webView) 38 : m_webView(webView)
41 { 39 {
42 } 40 }
43 41
44 std::unique_ptr<StorageNamespace> StorageClientImpl::createSessionStorageNamespa ce() 42 PassOwnPtr<StorageNamespace> StorageClientImpl::createSessionStorageNamespace()
45 { 43 {
46 if (!m_webView->client()) 44 if (!m_webView->client())
47 return nullptr; 45 return nullptr;
48 return wrapUnique(new StorageNamespace(wrapUnique(m_webView->client()->creat eSessionStorageNamespace()))); 46 return adoptPtr(new StorageNamespace(adoptPtr(m_webView->client()->createSes sionStorageNamespace())));
49 } 47 }
50 48
51 bool StorageClientImpl::canAccessStorage(LocalFrame* frame, StorageType type) co nst 49 bool StorageClientImpl::canAccessStorage(LocalFrame* frame, StorageType type) co nst
52 { 50 {
53 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); 51 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
54 return !webFrame->contentSettingsClient() || webFrame->contentSettingsClient ()->allowStorage(type == LocalStorage); 52 return !webFrame->contentSettingsClient() || webFrame->contentSettingsClient ()->allowStorage(type == LocalStorage);
55 } 53 }
56 54
57 } // namespace blink 55 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/StorageClientImpl.h ('k') | third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698