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

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

Issue 1190203002: Move (most of) chrome/browser/drive into components/drive/service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 5 years, 5 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 "chrome/browser/chromeos/drive/job_scheduler.h" 5 #include "chrome/browser/chromeos/drive/job_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/rand_util.h" 12 #include "base/rand_util.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
16 #include "chrome/browser/chromeos/drive/drive_pref_names.h" 16 #include "chrome/browser/chromeos/drive/drive_pref_names.h"
17 #include "chrome/browser/drive/event_logger.h" 17 #include "components/drive/event_logger.h"
18 #include "google_apis/drive/drive_api_parser.h" 18 #include "google_apis/drive/drive_api_parser.h"
19 19
20 namespace drive { 20 namespace drive {
21 21
22 namespace { 22 namespace {
23 23
24 // All jobs are retried at maximum of kMaxRetryCount when they fail due to 24 // All jobs are retried at maximum of kMaxRetryCount when they fail due to
25 // throttling or server error. The delay before retrying a job is shared among 25 // throttling or server error. The delay before retrying a job is shared among
26 // jobs. It doubles in length on each failure, upto 2^kMaxThrottleCount seconds. 26 // jobs. It doubles in length on each failure, upto 2^kMaxThrottleCount seconds.
27 // 27 //
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 case FILE_QUEUE: 1181 case FILE_QUEUE:
1182 return "FILE_QUEUE"; 1182 return "FILE_QUEUE";
1183 case NUM_QUEUES: 1183 case NUM_QUEUES:
1184 break; // This value is just a sentinel. Should never be used. 1184 break; // This value is just a sentinel. Should never be used.
1185 } 1185 }
1186 NOTREACHED(); 1186 NOTREACHED();
1187 return ""; 1187 return "";
1188 } 1188 }
1189 1189
1190 } // namespace drive 1190 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/job_scheduler.h ('k') | chrome/browser/chromeos/drive/job_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698