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

Side by Side Diff: chrome/browser/metrics/thread_watcher.cc

Issue 8366020: Create a secondary file thread, FILE_USER_BLOCKING... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/metrics/thread_watcher.h" 5 #include "chrome/browser/metrics/thread_watcher.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 live_threads_threshold); 486 live_threads_threshold);
487 StartWatching(BrowserThread::DB, "DB", kSleepTime, kUnresponsiveTime, 487 StartWatching(BrowserThread::DB, "DB", kSleepTime, kUnresponsiveTime,
488 unresponsive_threshold, crash_on_hang_thread_names, 488 unresponsive_threshold, crash_on_hang_thread_names,
489 live_threads_threshold); 489 live_threads_threshold);
490 StartWatching(BrowserThread::FILE, "FILE", kSleepTime, kUnresponsiveTime, 490 StartWatching(BrowserThread::FILE, "FILE", kSleepTime, kUnresponsiveTime,
491 unresponsive_threshold, crash_on_hang_thread_names, 491 unresponsive_threshold, crash_on_hang_thread_names,
492 live_threads_threshold); 492 live_threads_threshold);
493 StartWatching(BrowserThread::CACHE, "CACHE", kSleepTime, kUnresponsiveTime, 493 StartWatching(BrowserThread::CACHE, "CACHE", kSleepTime, kUnresponsiveTime,
494 unresponsive_threshold, crash_on_hang_thread_names, 494 unresponsive_threshold, crash_on_hang_thread_names,
495 live_threads_threshold); 495 live_threads_threshold);
496 StartWatching(BrowserThread::APPCACHE, "APPCACHE",
497 kSleepTime, kUnresponsiveTime,
498 unresponsive_threshold, crash_on_hang_thread_names,
499 live_threads_threshold);
496 500
497 BrowserThread::PostTask( 501 BrowserThread::PostTask(
498 BrowserThread::UI, 502 BrowserThread::UI,
499 FROM_HERE, 503 FROM_HERE,
500 NewRunnableFunction(StartupTimeBomb::Disarm)); 504 NewRunnableFunction(StartupTimeBomb::Disarm));
501 } 505 }
502 506
503 // static 507 // static
504 void ThreadWatcherList::StartWatching( 508 void ThreadWatcherList::StartWatching(
505 const BrowserThread::ID& thread_id, 509 const BrowserThread::ID& thread_id,
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 789
786 #if defined(OS_WIN) 790 #if defined(OS_WIN)
787 // On Windows XP, give twice the time for shutdown. 791 // On Windows XP, give twice the time for shutdown.
788 if (base::win::GetVersion() <= base::win::VERSION_XP) 792 if (base::win::GetVersion() <= base::win::VERSION_XP)
789 actual_duration *= 2; 793 actual_duration *= 2;
790 #endif 794 #endif
791 795
792 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); 796 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration);
793 shutdown_watchdog_->Arm(); 797 shutdown_watchdog_->Arm();
794 } 798 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698