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

Side by Side Diff: content/browser/download/drag_download_file.cc

Issue 8372034: Created an interface for DownloadFile, for use in unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/download/drag_download_file.h" 5 #include "content/browser/download/drag_download_file.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "content/browser/browser_context.h" 9 #include "content/browser/browser_context.h"
10 #include "content/browser/download/download_item.h" 10 #include "content/browser/download/download_item.h"
11 #include "content/browser/download/download_stats.h" 11 #include "content/browser/download/download_stats.h"
12 #include "content/browser/download/download_types.h"
12 #include "content/browser/tab_contents/tab_contents.h" 13 #include "content/browser/tab_contents/tab_contents.h"
13 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
14 #include "net/base/file_stream.h" 15 #include "net/base/file_stream.h"
15 16
16 using content::BrowserThread; 17 using content::BrowserThread;
17 18
18 DragDownloadFile::DragDownloadFile( 19 DragDownloadFile::DragDownloadFile(
19 const FilePath& file_name_or_path, 20 const FilePath& file_name_or_path,
20 linked_ptr<net::FileStream> file_stream, 21 linked_ptr<net::FileStream> file_stream,
21 const GURL& url, 22 const GURL& url,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 223
223 void DragDownloadFile::QuitNestedMessageLoop() { 224 void DragDownloadFile::QuitNestedMessageLoop() {
224 AssertCurrentlyOnDragThread(); 225 AssertCurrentlyOnDragThread();
225 226
226 if (is_running_nested_message_loop_) { 227 if (is_running_nested_message_loop_) {
227 is_running_nested_message_loop_ = false; 228 is_running_nested_message_loop_ = false;
228 MessageLoop::current()->Quit(); 229 MessageLoop::current()->Quit();
229 } 230 }
230 } 231 }
231 #endif 232 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698