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

Side by Side Diff: content/browser/fileapi/fileapi_message_filter.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/fileapi/fileapi_message_filter.h" 5 #include "content/browser/fileapi/fileapi_message_filter.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 590
591 void FileAPIMessageFilter::OnRevokePublicBlobURL(const GURL& public_url) { 591 void FileAPIMessageFilter::OnRevokePublicBlobURL(const GURL& public_url) {
592 DCHECK_CURRENTLY_ON(BrowserThread::IO); 592 DCHECK_CURRENTLY_ON(BrowserThread::IO);
593 ignore_result(blob_storage_host_->RevokePublicBlobURL(public_url)); 593 ignore_result(blob_storage_host_->RevokePublicBlobURL(public_url));
594 } 594 }
595 595
596 void FileAPIMessageFilter::OnStartBuildingStream( 596 void FileAPIMessageFilter::OnStartBuildingStream(
597 const GURL& url, const std::string& content_type) { 597 const GURL& url, const std::string& content_type) {
598 DCHECK_CURRENTLY_ON(BrowserThread::IO); 598 DCHECK_CURRENTLY_ON(BrowserThread::IO);
599 // Only an internal Blob URL is expected here. See the BlobURL of the Blink. 599 // Only an internal Blob URL is expected here. See the BlobURL of the Blink.
600 if (!base::StartsWithASCII(url.path(), "blobinternal%3A///", 600 if (!base::StartsWith(url.path(), "blobinternal%3A///",
601 true /* case_sensitive */)) { 601 base::CompareCase::SENSITIVE)) {
602 NOTREACHED() << "Malformed Stream URL: " << url.spec(); 602 NOTREACHED() << "Malformed Stream URL: " << url.spec();
603 bad_message::ReceivedBadMessage(this, 603 bad_message::ReceivedBadMessage(this,
604 bad_message::FAMF_MALFORMED_STREAM_URL); 604 bad_message::FAMF_MALFORMED_STREAM_URL);
605 return; 605 return;
606 } 606 }
607 // Use an empty security origin for now. Stream accepts a security origin 607 // Use an empty security origin for now. Stream accepts a security origin
608 // but how it's handled is not fixed yet. 608 // but how it's handled is not fixed yet.
609 new Stream(stream_context_->registry(), 609 new Stream(stream_context_->registry(),
610 NULL /* write_observer */, 610 NULL /* write_observer */,
611 url); 611 url);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 } 883 }
884 884
885 return true; 885 return true;
886 } 886 }
887 887
888 scoped_refptr<Stream> FileAPIMessageFilter::GetStreamForURL(const GURL& url) { 888 scoped_refptr<Stream> FileAPIMessageFilter::GetStreamForURL(const GURL& url) {
889 return stream_context_->registry()->GetStream(url); 889 return stream_context_->registry()->GetStream(url);
890 } 890 }
891 891
892 } // namespace content 892 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_stats.cc ('k') | content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698