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

Side by Side Diff: components/drive/job_scheduler.cc

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

Powered by Google App Engine
This is Rietveld 408576698