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/loader/fetch/MemoryCache.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // unmodified. For file and custom URLs clients may expect resources to be 110 // unmodified. For file and custom URLs clients may expect resources to be
111 // unique even when they differ by the fragment identifier only. 111 // unique even when they differ by the fragment identifier only.
112 if (!originalURL.protocolIsInHTTPFamily()) 112 if (!originalURL.protocolIsInHTTPFamily())
113 return originalURL; 113 return originalURL;
114 KURL url = originalURL; 114 KURL url = originalURL;
115 url.removeFragmentIdentifier(); 115 url.removeFragmentIdentifier();
116 return url; 116 return url;
117 } 117 }
118 118
119 String MemoryCache::defaultCacheIdentifier() { 119 String MemoryCache::defaultCacheIdentifier() {
120 return emptyString(); 120 return emptyString;
121 } 121 }
122 122
123 MemoryCache::ResourceMap* MemoryCache::ensureResourceMap( 123 MemoryCache::ResourceMap* MemoryCache::ensureResourceMap(
124 const String& cacheIdentifier) { 124 const String& cacheIdentifier) {
125 if (!m_resourceMaps.contains(cacheIdentifier)) { 125 if (!m_resourceMaps.contains(cacheIdentifier)) {
126 ResourceMapIndex::AddResult result = 126 ResourceMapIndex::AddResult result =
127 m_resourceMaps.add(cacheIdentifier, new ResourceMap); 127 m_resourceMaps.add(cacheIdentifier, new ResourceMap);
128 CHECK(result.isNewEntry); 128 CHECK(result.isNewEntry);
129 } 129 }
130 return m_resourceMaps.get(cacheIdentifier); 130 return m_resourceMaps.get(cacheIdentifier);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 } 459 }
460 return true; 460 return true;
461 } 461 }
462 462
463 void MemoryCache::onMemoryPressure(WebMemoryPressureLevel level) { 463 void MemoryCache::onMemoryPressure(WebMemoryPressureLevel level) {
464 pruneAll(); 464 pruneAll();
465 } 465 }
466 466
467 } // namespace blink 467 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698