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

Side by Side Diff: chrome/browser/chromeos/system_logs/debug_daemon_log_source.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 (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/system_logs/debug_daemon_log_source.h" 5 #include "chrome/browser/chromeos/system_logs/debug_daemon_log_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 it != users.end(); 145 it != users.end();
146 ++it) { 146 ++it) {
147 if ((*it)->username_hash().empty()) 147 if ((*it)->username_hash().empty())
148 continue; 148 continue;
149 profile_dirs.push_back( 149 profile_dirs.push_back(
150 chromeos::ProfileHelper::GetProfilePathByUserIdHash( 150 chromeos::ProfileHelper::GetProfilePathByUserIdHash(
151 (*it)->username_hash())); 151 (*it)->username_hash()));
152 } 152 }
153 153
154 base::PostTaskWithTraitsAndReply( 154 base::PostTaskWithTraitsAndReply(
155 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( 155 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
156 base::TaskPriority::BACKGROUND),
157 base::Bind(&DebugDaemonLogSource::ReadUserLogFiles, user_log_files, 156 base::Bind(&DebugDaemonLogSource::ReadUserLogFiles, user_log_files,
158 profile_dirs, response), 157 profile_dirs, response),
159 base::Bind(&DebugDaemonLogSource::MergeResponse, 158 base::Bind(&DebugDaemonLogSource::MergeResponse,
160 weak_ptr_factory_.GetWeakPtr(), base::Owned(response))); 159 weak_ptr_factory_.GetWeakPtr(), base::Owned(response)));
161 } else { 160 } else {
162 (*response_)[kUserLogFileKeyName] = kNotAvailable; 161 (*response_)[kUserLogFileKeyName] = kNotAvailable;
163 RequestCompleted(); 162 RequestCompleted();
164 } 163 }
165 } 164 }
166 165
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 198 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
200 DCHECK(!callback_.is_null()); 199 DCHECK(!callback_.is_null());
201 200
202 --num_pending_requests_; 201 --num_pending_requests_;
203 if (num_pending_requests_ > 0) 202 if (num_pending_requests_ > 0)
204 return; 203 return;
205 callback_.Run(response_.get()); 204 callback_.Run(response_.get());
206 } 205 }
207 206
208 } // namespace system_logs 207 } // namespace system_logs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698