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

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 1115343002: Added a whitelist for trace events that are known to be PII-less. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/metrics/statistics_recorder.h" 14 #include "base/metrics/statistics_recorder.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/process/memory.h" 16 #include "base/process/memory.h"
17 #include "base/process/process_handle.h" 17 #include "base/process/process_handle.h"
18 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
19 #include "base/trace_event/trace_event_impl.h"
19 #include "build/build_config.h" 20 #include "build/build_config.h"
20 #include "chrome/browser/chrome_content_browser_client.h" 21 #include "chrome/browser/chrome_content_browser_client.h"
21 #include "chrome/browser/defaults.h" 22 #include "chrome/browser/defaults.h"
22 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/chrome_content_client.h" 24 #include "chrome/common/chrome_content_client.h"
24 #include "chrome/common/chrome_paths.h" 25 #include "chrome/common/chrome_paths.h"
25 #include "chrome/common/chrome_paths_internal.h" 26 #include "chrome/common/chrome_paths_internal.h"
26 #include "chrome/common/chrome_result_codes.h" 27 #include "chrome/common/chrome_result_codes.h"
27 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/chrome_version_info.h" 29 #include "chrome/common/chrome_version_info.h"
29 #include "chrome/common/crash_keys.h" 30 #include "chrome/common/crash_keys.h"
30 #include "chrome/common/logging_chrome.h" 31 #include "chrome/common/logging_chrome.h"
31 #include "chrome/common/profiling.h" 32 #include "chrome/common/profiling.h"
32 #include "chrome/common/switch_utils.h" 33 #include "chrome/common/switch_utils.h"
34 #include "chrome/common/trace_event_args_whitelist.h"
33 #include "chrome/common/url_constants.h" 35 #include "chrome/common/url_constants.h"
34 #include "chrome/plugin/chrome_content_plugin_client.h" 36 #include "chrome/plugin/chrome_content_plugin_client.h"
35 #include "chrome/renderer/chrome_content_renderer_client.h" 37 #include "chrome/renderer/chrome_content_renderer_client.h"
36 #include "chrome/utility/chrome_content_utility_client.h" 38 #include "chrome/utility/chrome_content_utility_client.h"
37 #include "components/component_updater/component_updater_paths.h" 39 #include "components/component_updater/component_updater_paths.h"
38 #include "components/content_settings/core/common/content_settings_pattern.h" 40 #include "components/content_settings/core/common/content_settings_pattern.h"
39 #include "components/startup_metric_utils/startup_metric_utils.h" 41 #include "components/startup_metric_utils/startup_metric_utils.h"
40 #include "content/public/common/content_client.h" 42 #include "content/public/common/content_client.h"
41 #include "content/public/common/content_paths.h" 43 #include "content/public/common/content_paths.h"
42 #include "extensions/common/constants.h" 44 #include "extensions/common/constants.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // there have more impact. 433 // there have more impact.
432 const bool is_browser = !command_line.HasSwitch(switches::kProcessType); 434 const bool is_browser = !command_line.HasSwitch(switches::kProcessType);
433 ObjcEvilDoers::ZombieEnable(true, is_browser ? 10000 : 1000); 435 ObjcEvilDoers::ZombieEnable(true, is_browser ? 10000 : 1000);
434 436
435 SetUpBundleOverrides(); 437 SetUpBundleOverrides();
436 chrome::common::mac::EnableCFBundleBlocker(); 438 chrome::common::mac::EnableCFBundleBlocker();
437 #endif 439 #endif
438 440
439 Profiling::ProcessStarted(); 441 Profiling::ProcessStarted();
440 442
443 base::trace_event::TraceLog::GetInstance()->SetArgumentFilterPredicate(
444 base::Bind(&IsTraceEventArgsWhitelisted));
445
441 #if defined(OS_WIN) 446 #if defined(OS_WIN)
442 v8_breakpad_support::SetUp(); 447 v8_breakpad_support::SetUp();
443 #endif 448 #endif
444 449
445 #if defined(OS_POSIX) 450 #if defined(OS_POSIX)
446 if (HandleVersionSwitches(command_line)) { 451 if (HandleVersionSwitches(command_line)) {
447 *exit_code = 0; 452 *exit_code = 0;
448 return true; // Got a --version switch; exit with a success error code. 453 return true; // Got a --version switch; exit with a success error code.
449 } 454 }
450 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) 455 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 case chrome::VersionInfo::CHANNEL_CANARY: 985 case chrome::VersionInfo::CHANNEL_CANARY:
981 return true; 986 return true;
982 case chrome::VersionInfo::CHANNEL_DEV: 987 case chrome::VersionInfo::CHANNEL_DEV:
983 case chrome::VersionInfo::CHANNEL_BETA: 988 case chrome::VersionInfo::CHANNEL_BETA:
984 case chrome::VersionInfo::CHANNEL_STABLE: 989 case chrome::VersionInfo::CHANNEL_STABLE:
985 default: 990 default:
986 // Don't enable instrumentation. 991 // Don't enable instrumentation.
987 return false; 992 return false;
988 } 993 }
989 } 994 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698