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

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

Issue 515093002: FileAPI/sync file system cleanups for scoped_refptr operator T* cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 scoped_refptr<Stream> stream(GetStreamForURL(url)); 665 scoped_refptr<Stream> stream(GetStreamForURL(url));
666 if (stream.get()) 666 if (stream.get())
667 stream->Abort(); 667 stream->Abort();
668 } 668 }
669 669
670 void FileAPIMessageFilter::OnCloneStream( 670 void FileAPIMessageFilter::OnCloneStream(
671 const GURL& url, const GURL& src_url) { 671 const GURL& url, const GURL& src_url) {
672 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 672 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
673 // Abort if there's no Stream instance for |src_url| (source Stream which 673 // Abort if there's no Stream instance for |src_url| (source Stream which
674 // we're going to make |url| point to) in the registry. 674 // we're going to make |url| point to) in the registry.
675 if (!GetStreamForURL(src_url)) 675 if (!GetStreamForURL(src_url).get())
676 return; 676 return;
677 677
678 stream_context_->registry()->CloneStream(url, src_url); 678 stream_context_->registry()->CloneStream(url, src_url);
679 stream_urls_.insert(url.spec()); 679 stream_urls_.insert(url.spec());
680 } 680 }
681 681
682 void FileAPIMessageFilter::OnRemoveStream(const GURL& url) { 682 void FileAPIMessageFilter::OnRemoveStream(const GURL& url) {
683 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 683 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
684 684
685 if (!GetStreamForURL(url).get()) 685 if (!GetStreamForURL(url).get())
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 } 872 }
873 873
874 return true; 874 return true;
875 } 875 }
876 876
877 scoped_refptr<Stream> FileAPIMessageFilter::GetStreamForURL(const GURL& url) { 877 scoped_refptr<Stream> FileAPIMessageFilter::GetStreamForURL(const GURL& url) {
878 return stream_context_->registry()->GetStream(url); 878 return stream_context_->registry()->GetStream(url);
879 } 879 }
880 880
881 } // namespace content 881 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698