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

Side by Side Diff: chrome/browser/ui/views/about_ipc_dialog.cc

Issue 8574070: Move enabling IPC logging for all child processes to the Content API. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync 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
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 // Need to include this before any other file because it defines 5 // Need to include this before any other file because it defines
6 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 6 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
7 // IPC_MESSAGE_MACROS_LOG_ENABLED so that all_messages.h will generate the 7 // IPC_MESSAGE_MACROS_LOG_ENABLED so that all_messages.h will generate the
8 // ViewMsgLog et al. functions. 8 // ViewMsgLog et al. functions.
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 10
11 #ifdef IPC_MESSAGE_LOG_ENABLED 11 #ifdef IPC_MESSAGE_LOG_ENABLED
12 #define IPC_MESSAGE_MACROS_LOG_ENABLED 12 #define IPC_MESSAGE_MACROS_LOG_ENABLED
13 13
14 // We need to do this real early to be sure IPC_MESSAGE_MACROS_LOG_ENABLED 14 // We need to do this real early to be sure IPC_MESSAGE_MACROS_LOG_ENABLED
15 // doesn't get undefined. 15 // doesn't get undefined.
16 #include "chrome/common/all_messages.h" 16 #include "chrome/common/all_messages.h"
17 17
18 #include "chrome/browser/ui/views/about_ipc_dialog.h" 18 #include "chrome/browser/ui/views/about_ipc_dialog.h"
19 19
20 #include <set> 20 #include <set>
21 21
22 #include "base/string_util.h" 22 #include "base/string_util.h"
23 #include "base/threading/thread.h" 23 #include "base/threading/thread.h"
24 #include "base/time.h" 24 #include "base/time.h"
25 #include "base/utf_string_conversions.h" 25 #include "base/utf_string_conversions.h"
26 #include "chrome/app/chrome_command_ids.h" 26 #include "chrome/app/chrome_command_ids.h"
27 #include "chrome/app/chrome_dll_resource.h" 27 #include "chrome/app/chrome_dll_resource.h"
28 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/ui/browser_dialogs.h" 28 #include "chrome/browser/ui/browser_dialogs.h"
30 #include "chrome/common/chrome_constants.h" 29 #include "chrome/common/chrome_constants.h"
30 #include "content/public/browser/content_ipc_logging.h"
31 #include "net/url_request/url_request.h" 31 #include "net/url_request/url_request.h"
32 #include "net/url_request/url_request_job.h" 32 #include "net/url_request/url_request_job.h"
33 #include "views/controls/button/text_button.h" 33 #include "views/controls/button/text_button.h"
34 #include "views/controls/native/native_view_host.h" 34 #include "views/controls/native/native_view_host.h"
35 #include "views/layout/grid_layout.h" 35 #include "views/layout/grid_layout.h"
36 #include "views/layout/layout_constants.h" 36 #include "views/layout/layout_constants.h"
37 #include "views/widget/widget.h" 37 #include "views/widget/widget.h"
38 38
39 namespace { 39 namespace {
40 40
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 bool AboutIPCDialog::CanResize() const { 345 bool AboutIPCDialog::CanResize() const {
346 return true; 346 return true;
347 } 347 }
348 348
349 void AboutIPCDialog::ButtonPressed( 349 void AboutIPCDialog::ButtonPressed(
350 views::Button* button, const views::Event& event) { 350 views::Button* button, const views::Event& event) {
351 if (button == track_toggle_) { 351 if (button == track_toggle_) {
352 if (tracking_) { 352 if (tracking_) {
353 track_toggle_->SetText(kStartTrackingLabel); 353 track_toggle_->SetText(kStartTrackingLabel);
354 tracking_ = false; 354 tracking_ = false;
355 g_browser_process->SetIPCLoggingEnabled(false); 355 content::EnableIPCLogging(false);
356 } else { 356 } else {
357 track_toggle_->SetText(kStopTrackingLabel); 357 track_toggle_->SetText(kStopTrackingLabel);
358 tracking_ = true; 358 tracking_ = true;
359 g_browser_process->SetIPCLoggingEnabled(true); 359 content::EnableIPCLogging(true);
360 } 360 }
361 track_toggle_->SchedulePaint(); 361 track_toggle_->SchedulePaint();
362 } else if (button == clear_button_) { 362 } else if (button == clear_button_) {
363 message_list_.DeleteAllItems(); 363 message_list_.DeleteAllItems();
364 } else if (button == filter_button_) { 364 } else if (button == filter_button_) {
365 RunSettingsDialog(GetWidget()->GetNativeView()); 365 RunSettingsDialog(GetWidget()->GetNativeView());
366 } 366 }
367 } 367 }
368 368
369 namespace browser { 369 namespace browser {
370 370
371 void ShowAboutIPCDialog() { 371 void ShowAboutIPCDialog() {
372 AboutIPCDialog::RunDialog(); 372 AboutIPCDialog::RunDialog();
373 } 373 }
374 374
375 } // namespace browser 375 } // namespace browser
376 376
377 #endif // IPC_MESSAGE_LOG_ENABLED 377 #endif // IPC_MESSAGE_LOG_ENABLED
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm ('k') | chrome/test/base/testing_browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698