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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMURL.cpp

Issue 2268973002: Rename SecurityOriginCache to URLSecurityOriginMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fileapi/Blob.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Motorola Mobility Inc. 3 * Copyright (C) 2012 Motorola Mobility Inc.
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 14 matching lines...) Expand all
25 */ 25 */
26 26
27 #include "core/dom/DOMURL.h" 27 #include "core/dom/DOMURL.h"
28 28
29 #include "bindings/core/v8/ExceptionMessages.h" 29 #include "bindings/core/v8/ExceptionMessages.h"
30 #include "bindings/core/v8/ExceptionState.h" 30 #include "bindings/core/v8/ExceptionState.h"
31 #include "core/dom/ExceptionCode.h" 31 #include "core/dom/ExceptionCode.h"
32 #include "core/dom/ExecutionContext.h" 32 #include "core/dom/ExecutionContext.h"
33 #include "core/dom/URLSearchParams.h" 33 #include "core/dom/URLSearchParams.h"
34 #include "core/fetch/MemoryCache.h" 34 #include "core/fetch/MemoryCache.h"
35 #include "core/fileapi/Blob.h"
36 #include "core/html/PublicURLManager.h" 35 #include "core/html/PublicURLManager.h"
37 #include "platform/blob/BlobURL.h"
38 #include "platform/weborigin/SecurityOrigin.h"
39 #include "wtf/AutoReset.h" 36 #include "wtf/AutoReset.h"
40 37
41 namespace blink { 38 namespace blink {
42 39
43 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta te) 40 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta te)
44 { 41 {
45 if (!base.isValid()) { 42 if (!base.isValid()) {
46 exceptionState.throwTypeError("Invalid base URL"); 43 exceptionState.throwTypeError("Invalid base URL");
47 return; 44 return;
48 } 45 }
(...skipping 29 matching lines...) Expand all
78 { 75 {
79 DOMURLUtils::setSearch(value); 76 DOMURLUtils::setSearch(value);
80 if (!value.isEmpty() && value[0] == '?') 77 if (!value.isEmpty() && value[0] == '?')
81 updateSearchParams(value.substring(1)); 78 updateSearchParams(value.substring(1));
82 else 79 else
83 updateSearchParams(value); 80 updateSearchParams(value);
84 } 81 }
85 82
86 String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl e* registrable, const String& uuid) 83 String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl e* registrable, const String& uuid)
87 { 84 {
88 KURL publicURL = BlobURL::createPublicURL(executionContext->getSecurityOrigi n()); 85 return executionContext->publicURLManager().registerURL(executionContext, re gistrable, uuid);
89 if (publicURL.isEmpty())
90 return String();
91
92 executionContext->publicURLManager().registerURL(executionContext->getSecuri tyOrigin(), publicURL, registrable, uuid);
93
94 return publicURL.getString();
95 } 86 }
96 87
97 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String& uuid) 88 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String& uuid)
98 { 89 {
99 if (!executionContext) 90 if (!executionContext)
100 return; 91 return;
101 92
102 executionContext->publicURLManager().revoke(uuid); 93 executionContext->publicURLManager().revoke(uuid);
103 } 94 }
104 95
(...skipping 14 matching lines...) Expand all
119 { 110 {
120 if (!m_searchParams) 111 if (!m_searchParams)
121 return; 112 return;
122 113
123 AutoReset<bool> scope(&m_isInUpdate, true); 114 AutoReset<bool> scope(&m_isInUpdate, true);
124 ASSERT(m_searchParams->urlObject() == this); 115 ASSERT(m_searchParams->urlObject() == this);
125 m_searchParams->setInput(queryString); 116 m_searchParams->setInput(queryString);
126 } 117 }
127 118
128 } // namespace blink 119 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fileapi/Blob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698