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

Side by Side Diff: chrome/browser/chromeos/drive/job_scheduler.h

Issue 1018853005: Files.app: Obtain total bytes of upload task before starting tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/job_scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 const GURL& upload_location, 339 const GURL& upload_location,
340 scoped_ptr<google_apis::FileResource> entry); 340 scoped_ptr<google_apis::FileResource> entry);
341 341
342 // Updates the progress status of the specified job. 342 // Updates the progress status of the specified job.
343 void UpdateProgress(JobID job_id, int64 progress, int64 total); 343 void UpdateProgress(JobID job_id, int64 progress, int64 total);
344 344
345 // net::NetworkChangeNotifier::ConnectionTypeObserver override. 345 // net::NetworkChangeNotifier::ConnectionTypeObserver override.
346 void OnConnectionTypeChanged( 346 void OnConnectionTypeChanged(
347 net::NetworkChangeNotifier::ConnectionType type) override; 347 net::NetworkChangeNotifier::ConnectionType type) override;
348 348
349 // Updates total_bytes in JobInfo.
350 void OnGotFileSizeForJob(JobID job_id,
351 const std::string& histogram_name,
352 int64* size);
353
349 // Get the type of queue the specified job should be put in. 354 // Get the type of queue the specified job should be put in.
350 QueueType GetJobQueueType(JobType type); 355 QueueType GetJobQueueType(JobType type);
351 356
352 // For testing only. Disables throttling so that testing is faster. 357 // For testing only. Disables throttling so that testing is faster.
353 void SetDisableThrottling(bool disable) { disable_throttling_ = disable; } 358 void SetDisableThrottling(bool disable) { disable_throttling_ = disable; }
354 359
355 // Aborts a job which is not in STATE_RUNNING. 360 // Aborts a job which is not in STATE_RUNNING.
356 void AbortNotRunningJob(JobEntry* job, google_apis::DriveApiErrorCode error); 361 void AbortNotRunningJob(JobEntry* job, google_apis::DriveApiErrorCode error);
357 362
358 // Notifies updates to observers. 363 // Notifies updates to observers.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 402
398 // Note: This should remain the last member so it'll be destroyed and 403 // Note: This should remain the last member so it'll be destroyed and
399 // invalidate its weak pointers before any other members are destroyed. 404 // invalidate its weak pointers before any other members are destroyed.
400 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_; 405 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_;
401 DISALLOW_COPY_AND_ASSIGN(JobScheduler); 406 DISALLOW_COPY_AND_ASSIGN(JobScheduler);
402 }; 407 };
403 408
404 } // namespace drive 409 } // namespace drive
405 410
406 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ 411 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/job_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698