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

Side by Side Diff: extensions/renderer/wake_event_page.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 "extensions/renderer/wake_event_page.h" 5 #include "extensions/renderer/wake_event_page.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 IPC_END_MESSAGE_MAP() 178 IPC_END_MESSAGE_MAP()
179 return handled; 179 return handled;
180 } 180 }
181 181
182 void WakeEventPage::OnWakeEventPageResponse(int request_id, bool success) { 182 void WakeEventPage::OnWakeEventPageResponse(int request_id, bool success) {
183 std::unique_ptr<RequestData> request_data; 183 std::unique_ptr<RequestData> request_data;
184 { 184 {
185 base::AutoLock lock(requests_lock_); 185 base::AutoLock lock(requests_lock_);
186 request_data = requests_.take(request_id); 186 request_data = requests_.take(request_id);
187 } 187 }
188 CHECK(request_data) << "No request with ID " << request_id; 188 // No request with ID |request_id|
189 CHECK(request_data);
189 if (request_data->thread_id == 0) { 190 if (request_data->thread_id == 0) {
190 // Thread ID of 0 means it wasn't called on a worker thread, so safe to 191 // Thread ID of 0 means it wasn't called on a worker thread, so safe to
191 // call immediately. 192 // call immediately.
192 request_data->on_response.Run(success); 193 request_data->on_response.Run(success);
193 } else { 194 } else {
194 content::WorkerThread::PostTask( 195 content::WorkerThread::PostTask(
195 request_data->thread_id, 196 request_data->thread_id,
196 base::Bind(request_data->on_response, success)); 197 base::Bind(request_data->on_response, success));
197 } 198 }
198 } 199 }
199 200
200 } // namespace extensions 201 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698