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

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

Issue 11784016: chromeos: Block system suspend while uploading files to Drive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | Annotate | Revision Log
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/download/download_file_impl.h" 5 #include "content/browser/download/download_file_impl.h"
6 6
7 #include <string> 7 #include <string>
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/message_loop_proxy.h" 11 #include "base/message_loop_proxy.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "content/browser/download/byte_stream.h" 13 #include "content/browser/download/byte_stream.h"
14 #include "content/browser/download/download_create_info.h" 14 #include "content/browser/download/download_create_info.h"
15 #include "content/browser/download/download_interrupt_reasons_impl.h" 15 #include "content/browser/download/download_interrupt_reasons_impl.h"
16 #include "content/browser/download/download_net_log_parameters.h" 16 #include "content/browser/download/download_net_log_parameters.h"
17 #include "content/browser/power_save_blocker.h" 17 #include "content/browser/download/download_stats.h"
18 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
19 #include "content/public/browser/download_destination_observer.h" 19 #include "content/public/browser/download_destination_observer.h"
20 #include "content/browser/download/download_stats.h" 20 #include "content/public/browser/power_save_blocker.h"
21 #include "net/base/io_buffer.h" 21 #include "net/base/io_buffer.h"
22 22
23 namespace content { 23 namespace content {
24 24
25 const int kUpdatePeriodMs = 500; 25 const int kUpdatePeriodMs = 500;
26 const int kMaxTimeBlockingFileThreadMs = 1000; 26 const int kMaxTimeBlockingFileThreadMs = 1000;
27 27
28 int DownloadFile::number_active_objects_ = 0; 28 int DownloadFile::number_active_objects_ = 0;
29 29
30 DownloadFileImpl::DownloadFileImpl( 30 DownloadFileImpl::DownloadFileImpl(
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 base::Bind(&DownloadDestinationObserver::DestinationUpdate, 303 base::Bind(&DownloadDestinationObserver::DestinationUpdate,
304 observer_, BytesSoFar(), CurrentSpeed(), GetHashState())); 304 observer_, BytesSoFar(), CurrentSpeed(), GetHashState()));
305 } 305 }
306 306
307 // static 307 // static
308 int DownloadFile::GetNumberOfDownloadFiles() { 308 int DownloadFile::GetNumberOfDownloadFiles() {
309 return number_active_objects_; 309 return number_active_objects_;
310 } 310 }
311 311
312 } // namespace content 312 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_file_factory.cc ('k') | content/browser/download/download_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698