| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Motorola Mobility Inc. | 2 * Copyright (C) 2012 Motorola Mobility Inc. |
| 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. |
| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void PublicURLManager::revoke(const String& uuid) | 69 void PublicURLManager::revoke(const String& uuid) |
| 70 { | 70 { |
| 71 // A linear scan; revoking by UUID is assumed rare. | 71 // A linear scan; revoking by UUID is assumed rare. |
| 72 Vector<String> urlsToRemove; | 72 Vector<String> urlsToRemove; |
| 73 for (auto& registryUrl : m_registryToURL) { | 73 for (auto& registryUrl : m_registryToURL) { |
| 74 URLRegistry* registry = registryUrl.key; | 74 URLRegistry* registry = registryUrl.key; |
| 75 URLMap& registeredURLs = registryUrl.value; | 75 URLMap& registeredURLs = registryUrl.value; |
| 76 for (auto& registeredUrl : registeredURLs) { | 76 for (auto& registeredUrl : registeredURLs) { |
| 77 if (uuid == registeredUrl.value) { | 77 if (uuid == registeredUrl.value) { |
| 78 KURL url(ParsedURLString, registeredUrl.key); | 78 KURL url(ParsedURLString, registeredUrl.key); |
| 79 executionContext()->removeURLFromMemoryCache(url); | 79 getExecutionContext()->removeURLFromMemoryCache(url); |
| 80 registry->unregisterURL(url); | 80 registry->unregisterURL(url); |
| 81 urlsToRemove.append(registeredUrl.key); | 81 urlsToRemove.append(registeredUrl.key); |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 for (unsigned j = 0; j < urlsToRemove.size(); j++) | 84 for (unsigned j = 0; j < urlsToRemove.size(); j++) |
| 85 registeredURLs.remove(urlsToRemove[j]); | 85 registeredURLs.remove(urlsToRemove[j]); |
| 86 urlsToRemove.clear(); | 86 urlsToRemove.clear(); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 100 | 100 |
| 101 m_registryToURL.clear(); | 101 m_registryToURL.clear(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 DEFINE_TRACE(PublicURLManager) | 104 DEFINE_TRACE(PublicURLManager) |
| 105 { | 105 { |
| 106 ContextLifecycleObserver::trace(visitor); | 106 ContextLifecycleObserver::trace(visitor); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| OLD | NEW |