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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h

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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple 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 * 7 *
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 17 matching lines...) Expand all
28 28
29 #ifndef SecurityOrigin_h 29 #ifndef SecurityOrigin_h
30 #define SecurityOrigin_h 30 #define SecurityOrigin_h
31 31
32 #include "base/gtest_prod_util.h" 32 #include "base/gtest_prod_util.h"
33 #include "platform/PlatformExport.h" 33 #include "platform/PlatformExport.h"
34 #include "platform/weborigin/Suborigin.h" 34 #include "platform/weborigin/Suborigin.h"
35 #include "wtf/Noncopyable.h" 35 #include "wtf/Noncopyable.h"
36 #include "wtf/ThreadSafeRefCounted.h" 36 #include "wtf/ThreadSafeRefCounted.h"
37 #include "wtf/text/WTFString.h" 37 #include "wtf/text/WTFString.h"
38 #include <memory>
38 39
39 namespace blink { 40 namespace blink {
40 41
41 class KURL; 42 class KURL;
42 class SecurityOriginCache; 43 class SecurityOriginCache;
43 44
44 class PLATFORM_EXPORT SecurityOrigin : public RefCounted<SecurityOrigin> { 45 class PLATFORM_EXPORT SecurityOrigin : public RefCounted<SecurityOrigin> {
45 WTF_MAKE_NONCOPYABLE(SecurityOrigin); 46 WTF_MAKE_NONCOPYABLE(SecurityOrigin);
46 public: 47 public:
47 static PassRefPtr<SecurityOrigin> create(const KURL&); 48 static PassRefPtr<SecurityOrigin> create(const KURL&);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // The following privileges are currently copied over: 245 // The following privileges are currently copied over:
245 // 246 //
246 // - Grant universal access. 247 // - Grant universal access.
247 // - Grant loading of local resources. 248 // - Grant loading of local resources.
248 // - Use path-based file:// origins. 249 // - Use path-based file:// origins.
249 struct PrivilegeData { 250 struct PrivilegeData {
250 bool m_universalAccess; 251 bool m_universalAccess;
251 bool m_canLoadLocalResources; 252 bool m_canLoadLocalResources;
252 bool m_blockLocalAccessFromLocalOrigin; 253 bool m_blockLocalAccessFromLocalOrigin;
253 }; 254 };
254 PassOwnPtr<PrivilegeData> createPrivilegeData() const; 255 std::unique_ptr<PrivilegeData> createPrivilegeData() const;
255 void transferPrivilegesFrom(PassOwnPtr<PrivilegeData>); 256 void transferPrivilegesFrom(std::unique_ptr<PrivilegeData>);
256 257
257 void setUniqueOriginIsPotentiallyTrustworthy(bool isUniqueOriginPotentiallyT rustworthy); 258 void setUniqueOriginIsPotentiallyTrustworthy(bool isUniqueOriginPotentiallyT rustworthy);
258 259
259 private: 260 private:
260 friend class SecurityOriginTest; 261 friend class SecurityOriginTest;
261 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, Suborigins); 262 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, Suborigins);
262 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsParsing); 263 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsParsing);
263 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsIsSameSchemeHostPortA ndSuborigin); 264 FRIEND_TEST_ALL_PREFIXES(SecurityOriginTest, SuboriginsIsSameSchemeHostPortA ndSuborigin);
264 265
265 SecurityOrigin(); 266 SecurityOrigin();
(...skipping 17 matching lines...) Expand all
283 bool m_universalAccess; 284 bool m_universalAccess;
284 bool m_domainWasSetInDOM; 285 bool m_domainWasSetInDOM;
285 bool m_canLoadLocalResources; 286 bool m_canLoadLocalResources;
286 bool m_blockLocalAccessFromLocalOrigin; 287 bool m_blockLocalAccessFromLocalOrigin;
287 bool m_isUniqueOriginPotentiallyTrustworthy; 288 bool m_isUniqueOriginPotentiallyTrustworthy;
288 }; 289 };
289 290
290 } // namespace blink 291 } // namespace blink
291 292
292 #endif // SecurityOrigin_h 293 #endif // SecurityOrigin_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/KURL.cpp ('k') | third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698