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

Side by Side Diff: third_party/WebKit/Source/web/StorageClientImpl.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 * 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>
34 36
35 namespace blink { 37 namespace blink {
36 38
37 StorageClientImpl::StorageClientImpl(WebViewImpl* webView) 39 StorageClientImpl::StorageClientImpl(WebViewImpl* webView)
38 : m_webView(webView) 40 : m_webView(webView)
39 { 41 {
40 } 42 }
41 43
42 PassOwnPtr<StorageNamespace> StorageClientImpl::createSessionStorageNamespace() 44 std::unique_ptr<StorageNamespace> StorageClientImpl::createSessionStorageNamespa ce()
43 { 45 {
44 if (!m_webView->client()) 46 if (!m_webView->client())
45 return nullptr; 47 return nullptr;
46 return adoptPtr(new StorageNamespace(adoptPtr(m_webView->client()->createSes sionStorageNamespace()))); 48 return wrapUnique(new StorageNamespace(wrapUnique(m_webView->client()->creat eSessionStorageNamespace())));
47 } 49 }
48 50
49 bool StorageClientImpl::canAccessStorage(LocalFrame* frame, StorageType type) co nst 51 bool StorageClientImpl::canAccessStorage(LocalFrame* frame, StorageType type) co nst
50 { 52 {
51 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); 53 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
52 return !webFrame->contentSettingsClient() || webFrame->contentSettingsClient ()->allowStorage(type == LocalStorage); 54 return !webFrame->contentSettingsClient() || webFrame->contentSettingsClient ()->allowStorage(type == LocalStorage);
53 } 55 }
54 56
55 } // namespace blink 57 } // 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