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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp

Issue 2017303002: Revert of Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return createFileSystemURL(entry->fullPath()); 138 return createFileSystemURL(entry->fullPath());
139 } 139 }
140 140
141 KURL DOMFileSystemBase::createFileSystemURL(const String& fullPath) const 141 KURL DOMFileSystemBase::createFileSystemURL(const String& fullPath) const
142 { 142 {
143 ASSERT(DOMFilePath::isAbsolute(fullPath)); 143 ASSERT(DOMFilePath::isAbsolute(fullPath));
144 144
145 if (type() == FileSystemTypeExternal) { 145 if (type() == FileSystemTypeExternal) {
146 // For external filesystem originString could be different from what we have in m_filesystemRootURL. 146 // For external filesystem originString could be different from what we have in m_filesystemRootURL.
147 StringBuilder result; 147 StringBuilder result;
148 result.append("filesystem:"); 148 result.appendLiteral("filesystem:");
149 result.append(getSecurityOrigin()->toString()); 149 result.append(getSecurityOrigin()->toString());
150 result.append('/'); 150 result.append('/');
151 result.append(externalPathPrefix); 151 result.append(externalPathPrefix);
152 result.append(m_filesystemRootURL.path()); 152 result.append(m_filesystemRootURL.path());
153 // Remove the extra leading slash. 153 // Remove the extra leading slash.
154 result.append(encodeWithURLEscapeSequences(fullPath.substring(1))); 154 result.append(encodeWithURLEscapeSequences(fullPath.substring(1)));
155 return KURL(ParsedURLString, result.toString()); 155 return KURL(ParsedURLString, result.toString());
156 } 156 }
157 157
158 // For regular types we can just append the entry's fullPath to the m_filesy stemRootURL that should look like 'filesystem:<origin>/<typePrefix>'. 158 // For regular types we can just append the entry's fullPath to the m_filesy stemRootURL that should look like 'filesystem:<origin>/<typePrefix>'.
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 407 }
408 408
409 bool DOMFileSystemBase::waitForAdditionalResult(int callbacksId) 409 bool DOMFileSystemBase::waitForAdditionalResult(int callbacksId)
410 { 410 {
411 if (!fileSystem()) 411 if (!fileSystem())
412 return false; 412 return false;
413 return fileSystem()->waitForAdditionalResult(callbacksId); 413 return fileSystem()->waitForAdditionalResult(callbacksId);
414 } 414 }
415 415
416 } // namespace blink 416 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698