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

Side by Side Diff: chrome/browser/safe_browsing/chrome_cleaner/srt_fetcher_win.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/safe_browsing/chrome_cleaner/srt_fetcher_win.h" 5 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_fetcher_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 1160
1161 // The invocations to run next time the SwReporter is run. 1161 // The invocations to run next time the SwReporter is run.
1162 SwReporterQueue pending_invocations_; 1162 SwReporterQueue pending_invocations_;
1163 1163
1164 base::Version version_; 1164 base::Version version_;
1165 1165
1166 scoped_refptr<base::TaskRunner> blocking_task_runner_ = 1166 scoped_refptr<base::TaskRunner> blocking_task_runner_ =
1167 base::CreateTaskRunnerWithTraits( 1167 base::CreateTaskRunnerWithTraits(
1168 // LaunchAndWaitForExitOnBackgroundThread() creates (MayBlock()) and 1168 // LaunchAndWaitForExitOnBackgroundThread() creates (MayBlock()) and
1169 // joins (WithBaseSyncPrimitives()) a process. 1169 // joins (WithBaseSyncPrimitives()) a process.
1170 base::TaskTraits() 1170 {base::MayBlock(), base::WithBaseSyncPrimitives(),
1171 .WithShutdownBehavior( 1171 base::TaskPriority::BACKGROUND,
1172 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) 1172 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN});
1173 .WithPriority(base::TaskPriority::BACKGROUND)
1174 .MayBlock()
1175 .WithBaseSyncPrimitives());
1176 1173
1177 // This value is used to identify how long to wait before starting a new run 1174 // This value is used to identify how long to wait before starting a new run
1178 // of the reporter queue. It's initialized with the default value and may be 1175 // of the reporter queue. It's initialized with the default value and may be
1179 // changed to a different value when a prompt is pending and the reporter 1176 // changed to a different value when a prompt is pending and the reporter
1180 // should be run before adding the global error to the Chrome menu. 1177 // should be run before adding the global error to the Chrome menu.
1181 int days_between_reporter_runs_ = kDaysBetweenSuccessfulSwReporterRuns; 1178 int days_between_reporter_runs_ = kDaysBetweenSuccessfulSwReporterRuns;
1182 1179
1183 // This will be true if the current queue of invocations started at a time 1180 // This will be true if the current queue of invocations started at a time
1184 // when logs should be uploaded. 1181 // when logs should be uploaded.
1185 bool in_logs_upload_period_ = false; 1182 bool in_logs_upload_period_ = false;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 return srt_cleaner_key.Open(HKEY_CURRENT_USER, cleaner_key_path.c_str(), 1242 return srt_cleaner_key.Open(HKEY_CURRENT_USER, cleaner_key_path.c_str(),
1246 KEY_QUERY_VALUE) == ERROR_SUCCESS && 1243 KEY_QUERY_VALUE) == ERROR_SUCCESS &&
1247 srt_cleaner_key.GetValueCount() > 0; 1244 srt_cleaner_key.GetValueCount() > 0;
1248 } 1245 }
1249 1246
1250 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) { 1247 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) {
1251 g_testing_delegate_ = delegate; 1248 g_testing_delegate_ = delegate;
1252 } 1249 }
1253 1250
1254 } // namespace safe_browsing 1251 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698