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

Side by Side Diff: third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp

Issue 1983753002: Remove OwnPtr::release() calls in core/ (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 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 * 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 { 45 {
46 OwnPtr<HTTPHeaderSet> headerSet = adoptPtr(new HashSet<String, CaseFoldingHa sh>); 46 OwnPtr<HTTPHeaderSet> headerSet = adoptPtr(new HashSet<String, CaseFoldingHa sh>);
47 47
48 headerSet->add("cache-control"); 48 headerSet->add("cache-control");
49 headerSet->add("content-language"); 49 headerSet->add("content-language");
50 headerSet->add("content-type"); 50 headerSet->add("content-type");
51 headerSet->add("expires"); 51 headerSet->add("expires");
52 headerSet->add("last-modified"); 52 headerSet->add("last-modified");
53 headerSet->add("pragma"); 53 headerSet->add("pragma");
54 54
55 return headerSet.release(); 55 return headerSet;
56 } 56 }
57 57
58 bool isOnAccessControlResponseHeaderWhitelist(const String& name) 58 bool isOnAccessControlResponseHeaderWhitelist(const String& name)
59 { 59 {
60 DEFINE_THREAD_SAFE_STATIC_LOCAL(HTTPHeaderSet, allowedCrossOriginResponseHea ders, (createAllowedCrossOriginResponseHeadersSet().leakPtr())); 60 DEFINE_THREAD_SAFE_STATIC_LOCAL(HTTPHeaderSet, allowedCrossOriginResponseHea ders, (createAllowedCrossOriginResponseHeadersSet().leakPtr()));
61 61
62 return allowedCrossOriginResponseHeaders.contains(name); 62 return allowedCrossOriginResponseHeaders.contains(name);
63 } 63 }
64 64
65 void updateRequestForAccessControl(ResourceRequest& request, SecurityOrigin* sec urityOrigin, StoredCredentials allowCredentials) 65 void updateRequestForAccessControl(ResourceRequest& request, SecurityOrigin* sec urityOrigin, StoredCredentials allowCredentials)
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 newRequest.setHTTPOrigin(securityOrigin); 311 newRequest.setHTTPOrigin(securityOrigin);
312 // If the user didn't request credentials in the first place, update our 312 // If the user didn't request credentials in the first place, update our
313 // state so we neither request them nor expect they must be allowed. 313 // state so we neither request them nor expect they must be allowed.
314 if (options.credentialsRequested == ClientDidNotRequestCredentials) 314 if (options.credentialsRequested == ClientDidNotRequestCredentials)
315 options.allowCredentials = DoNotAllowStoredCredentials; 315 options.allowCredentials = DoNotAllowStoredCredentials;
316 } 316 }
317 return true; 317 return true;
318 } 318 }
319 319
320 } // namespace blink 320 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/MessageEvent.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698