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

Side by Side Diff: webrtc/system_wrappers/source/data_log.cc

Issue 1469013002: Move ThreadWrapper to ProcessThread in base. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removed comment Created 5 years, 1 month 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 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 if (instance_ == NULL) { 341 if (instance_ == NULL) {
342 instance_ = new DataLogImpl(); 342 instance_ = new DataLogImpl();
343 return instance_->Init(); 343 return instance_->Init();
344 } else { 344 } else {
345 ++instance_->counter_; 345 ++instance_->counter_;
346 } 346 }
347 return 0; 347 return 0;
348 } 348 }
349 349
350 int DataLogImpl::Init() { 350 int DataLogImpl::Init() {
351 file_writer_thread_ = ThreadWrapper::CreateThread( 351 file_writer_thread_ =
352 DataLogImpl::Run, instance_, "DataLog"); 352 PlatformThread::CreateThread(DataLogImpl::Run, instance_, "DataLog");
353 bool success = file_writer_thread_->Start(); 353 bool success = file_writer_thread_->Start();
354 if (!success) 354 if (!success)
355 return -1; 355 return -1;
356 file_writer_thread_->SetPriority(kHighestPriority); 356 file_writer_thread_->SetPriority(kHighestPriority);
357 return 0; 357 return 0;
358 } 358 }
359 359
360 DataLogImpl* DataLogImpl::StaticInstance() { 360 DataLogImpl* DataLogImpl::StaticInstance() {
361 return instance_; 361 return instance_;
362 } 362 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 void DataLogImpl::StopThread() { 437 void DataLogImpl::StopThread() {
438 if (file_writer_thread_) { 438 if (file_writer_thread_) {
439 flush_event_->Set(); 439 flush_event_->Set();
440 file_writer_thread_->Stop(); 440 file_writer_thread_->Stop();
441 } 441 }
442 } 442 }
443 443
444 } // namespace webrtc 444 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/critical_section_unittest.cc ('k') | webrtc/system_wrappers/source/event_timer_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698