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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp

Issue 2674953003: Only generate suggested filenames when actually dragging an image. (Closed)
Patch Set: rebase 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, 2009, 2010, 2011 Apple Inc. All 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 rights reserved. 6 rights reserved.
7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 ArchiveResource* archiveResource = 379 ArchiveResource* archiveResource =
380 m_archive->subresourceForURL(request.url()); 380 m_archive->subresourceForURL(request.url());
381 // Fall back to the network if the archive doesn't contain the resource. 381 // Fall back to the network if the archive doesn't contain the resource.
382 if (!archiveResource) 382 if (!archiveResource)
383 return nullptr; 383 return nullptr;
384 mimetype = archiveResource->mimeType(); 384 mimetype = archiveResource->mimeType();
385 charset = archiveResource->textEncoding(); 385 charset = archiveResource->textEncoding();
386 data = archiveResource->data(); 386 data = archiveResource->data();
387 } 387 }
388 388
389 ResourceResponse response(url, mimetype, data->size(), charset, String()); 389 ResourceResponse response(url, mimetype, data->size(), charset);
390 response.setHTTPStatusCode(200); 390 response.setHTTPStatusCode(200);
391 response.setHTTPStatusText("OK"); 391 response.setHTTPStatusText("OK");
392 392
393 Resource* resource = factory.create(request.resourceRequest(), 393 Resource* resource = factory.create(request.resourceRequest(),
394 request.options(), request.charset()); 394 request.options(), request.charset());
395 resource->setNeedsSynchronousCacheHit(substituteData.forceSynchronousLoad()); 395 resource->setNeedsSynchronousCacheHit(substituteData.forceSynchronousLoad());
396 // FIXME: We should provide a body stream here. 396 // FIXME: We should provide a body stream here.
397 resource->responseReceived(response, nullptr); 397 resource->responseReceived(response, nullptr);
398 resource->setDataBufferingPolicy(BufferData); 398 resource->setDataBufferingPolicy(BufferData);
399 if (data->size()) 399 if (data->size())
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 visitor->trace(m_context); 1543 visitor->trace(m_context);
1544 visitor->trace(m_archive); 1544 visitor->trace(m_archive);
1545 visitor->trace(m_loaders); 1545 visitor->trace(m_loaders);
1546 visitor->trace(m_nonBlockingLoaders); 1546 visitor->trace(m_nonBlockingLoaders);
1547 visitor->trace(m_documentResources); 1547 visitor->trace(m_documentResources);
1548 visitor->trace(m_preloads); 1548 visitor->trace(m_preloads);
1549 visitor->trace(m_resourceTimingInfoMap); 1549 visitor->trace(m_resourceTimingInfoMap);
1550 } 1550 }
1551 1551
1552 } // namespace blink 1552 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698