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

Side by Side Diff: chrome/browser/in_process_webkit/webkit_thread.cc

Issue 6528016: Expose WebCore log channels on the chrome command line (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remediate to Darin's review Created 9 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/browser_render_process_host.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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // source code is governed by a BSD-style license that can be found in the 2 // Use of this source code is governed by a BSD-style license that can be
3 // LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/in_process_webkit/webkit_thread.h" 5 #include "chrome/browser/in_process_webkit/webkit_thread.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/in_process_webkit/browser_webkitclient_impl.h" 8 #include "chrome/browser/in_process_webkit/browser_webkitclient_impl.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
11 #include "webkit/glue/webkit_glue.h"
11 12
12 WebKitThread::WebKitThread() { 13 WebKitThread::WebKitThread() {
13 } 14 }
14 15
15 // This happens on the UI thread after the IO thread has been shut down. 16 // This happens on the UI thread after the IO thread has been shut down.
16 WebKitThread::~WebKitThread() { 17 WebKitThread::~WebKitThread() {
17 // We can't just check CurrentlyOn(BrowserThread::UI) because in unit tests, 18 // We can't just check CurrentlyOn(BrowserThread::UI) because in unit tests,
18 // MessageLoop::Current is sometimes NULL and other times valid and there's 19 // MessageLoop::Current is sometimes NULL and other times valid and there's
19 // no BrowserThread object. Can't check that CurrentlyOn is not IO since 20 // no BrowserThread object. Can't check that CurrentlyOn is not IO since
20 // some unit tests set that BrowserThread for other checks. 21 // some unit tests set that BrowserThread for other checks.
(...skipping 18 matching lines...) Expand all
39 } 40 }
40 41
41 WebKitThread::InternalWebKitThread::~InternalWebKitThread() { 42 WebKitThread::InternalWebKitThread::~InternalWebKitThread() {
42 Stop(); 43 Stop();
43 } 44 }
44 45
45 void WebKitThread::InternalWebKitThread::Init() { 46 void WebKitThread::InternalWebKitThread::Init() {
46 DCHECK(!webkit_client_.get()); 47 DCHECK(!webkit_client_.get());
47 webkit_client_.reset(new BrowserWebKitClientImpl); 48 webkit_client_.reset(new BrowserWebKitClientImpl);
48 WebKit::initialize(webkit_client_.get()); 49 WebKit::initialize(webkit_client_.get());
50 webkit_glue::EnableWebCoreLogChannels(
51 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
52 switches::kWebCoreLogChannels));
53
49 // If possible, post initialization tasks to this thread (rather than doing 54 // If possible, post initialization tasks to this thread (rather than doing
50 // them now) so we don't block the UI thread any longer than we have to. 55 // them now) so we don't block the UI thread any longer than we have to.
51 } 56 }
52 57
53 void WebKitThread::InternalWebKitThread::CleanUp() { 58 void WebKitThread::InternalWebKitThread::CleanUp() {
54 DCHECK(webkit_client_.get()); 59 DCHECK(webkit_client_.get());
55 WebKit::shutdown(); 60 WebKit::shutdown();
56 } 61 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698