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

Side by Side Diff: chrome/browser/jankometer.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <limits> 5 #include <limits>
6 6
7 #include "chrome/browser/jankometer.h" 7 #include "chrome/browser/jankometer.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/metrics/stats_counters.h" 14 #include "base/metrics/stats_counters.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
17 #include "base/threading/watchdog.h" 17 #include "base/threading/watchdog.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
22 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
23 23
24 #if defined(TOOLKIT_USES_GTK) 24 #if defined(TOOLKIT_USES_GTK)
25 #include "chrome/browser/ui/gtk/gtk_util.h" 25 #include "chrome/browser/ui/gtk/gtk_util.h"
26 #endif 26 #endif
27 27
28 using base::TimeDelta; 28 using base::TimeDelta;
29 using base::TimeTicks; 29 using base::TimeTicks;
30 using content::BrowserThread;
30 31
31 namespace { 32 namespace {
32 33
33 // The maximum threshold of delay of the message before considering it a delay. 34 // The maximum threshold of delay of the message before considering it a delay.
34 // For a debug build, you may want to set IO delay around 500ms. 35 // For a debug build, you may want to set IO delay around 500ms.
35 // For a release build, setting it around 350ms is sensible. 36 // For a release build, setting it around 350ms is sensible.
36 // Visit about:histograms to see what the distribution is on your system, with 37 // Visit about:histograms to see what the distribution is on your system, with
37 // your build. Be sure to do some work to get interesting stats. 38 // your build. Be sure to do some work to get interesting stats.
38 // The numbers below came from a warm start (you'll get about 5-10 alarms with 39 // The numbers below came from a warm start (you'll get about 5-10 alarms with
39 // a cold start), and running the page-cycler for 5 rounds. 40 // a cold start), and running the page-cycler for 5 rounds.
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 delete ui_observer; 419 delete ui_observer;
419 ui_observer = NULL; 420 ui_observer = NULL;
420 } 421 }
421 if (io_observer) { 422 if (io_observer) {
422 // IO thread can't be running when we remove observers. 423 // IO thread can't be running when we remove observers.
423 DCHECK((!g_browser_process) || !(g_browser_process->io_thread())); 424 DCHECK((!g_browser_process) || !(g_browser_process->io_thread()));
424 delete io_observer; 425 delete io_observer;
425 io_observer = NULL; 426 io_observer = NULL;
426 } 427 }
427 } 428 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698