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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "content/browser/download/save_file_manager.h" 7 #include "content/browser/download/save_file_manager.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "content/browser/download/save_file.h" 15 #include "content/browser/download/save_file.h"
16 #include "content/browser/download/save_package.h" 16 #include "content/browser/download/save_package.h"
17 #include "content/browser/renderer_host/render_view_host.h" 17 #include "content/browser/renderer_host/render_view_host.h"
18 #include "content/browser/renderer_host/resource_dispatcher_host.h" 18 #include "content/browser/renderer_host/resource_dispatcher_host.h"
19 #include "content/browser/tab_contents/tab_contents.h" 19 #include "content/browser/tab_contents/tab_contents.h"
20 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
21 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
22 #include "net/base/io_buffer.h" 22 #include "net/base/io_buffer.h"
23 #include "net/base/net_util.h" 23 #include "net/base/net_util.h"
24 24
25 using content::BrowserThread;
26
25 SaveFileManager::SaveFileManager(ResourceDispatcherHost* rdh) 27 SaveFileManager::SaveFileManager(ResourceDispatcherHost* rdh)
26 : next_id_(0), 28 : next_id_(0),
27 resource_dispatcher_host_(rdh) { 29 resource_dispatcher_host_(rdh) {
28 DCHECK(resource_dispatcher_host_); 30 DCHECK(resource_dispatcher_host_);
29 } 31 }
30 32
31 SaveFileManager::~SaveFileManager() { 33 SaveFileManager::~SaveFileManager() {
32 // Check for clean shutdown. 34 // Check for clean shutdown.
33 DCHECK(save_file_map_.empty()); 35 DCHECK(save_file_map_.empty());
34 } 36 }
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 SaveFileMap::iterator it = save_file_map_.find(*i); 513 SaveFileMap::iterator it = save_file_map_.find(*i);
512 if (it != save_file_map_.end()) { 514 if (it != save_file_map_.end()) {
513 SaveFile* save_file = it->second; 515 SaveFile* save_file = it->second;
514 DCHECK(!save_file->in_progress()); 516 DCHECK(!save_file->in_progress());
515 file_util::Delete(save_file->full_path(), false); 517 file_util::Delete(save_file->full_path(), false);
516 delete save_file; 518 delete save_file;
517 save_file_map_.erase(it); 519 save_file_map_.erase(it);
518 } 520 }
519 } 521 }
520 } 522 }
OLDNEW
« no previous file with comments | « content/browser/download/save_file.cc ('k') | content/browser/download/save_file_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698