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

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

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_crash_reporter_client.h" 5 #include "chrome/app/chrome_crash_reporter_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
15 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
16 #include "chrome/common/chrome_result_codes.h" 16 #include "chrome/common/chrome_result_codes.h"
17 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
18 #include "chrome/common/crash_keys.h" 18 #include "chrome/common/crash_keys.h"
19 #include "chrome/common/env_vars.h" 19 #include "chrome/common/env_vars.h"
20 #include "chrome/installer/util/google_update_settings.h" 20 #include "chrome/installer/util/google_update_settings.h"
21 #include "components/version_info/version_info.h"
21 22
22 #if defined(OS_WIN) 23 #if defined(OS_WIN)
23 #include <windows.h> 24 #include <windows.h>
24 25
25 #include "base/file_version_info.h" 26 #include "base/file_version_info.h"
26 #include "base/win/registry.h" 27 #include "base/win/registry.h"
27 #include "chrome/installer/util/google_chrome_sxs_distribution.h" 28 #include "chrome/installer/util/google_chrome_sxs_distribution.h"
28 #include "chrome/installer/util/install_util.h" 29 #include "chrome/installer/util/install_util.h"
29 #include "chrome/installer/util/util_constants.h" 30 #include "chrome/installer/util/util_constants.h"
30 #include "components/browser_watcher/crash_reporting_metrics_win.h" 31 #include "components/browser_watcher/crash_reporting_metrics_win.h"
31 #include "policy/policy_constants.h" 32 #include "policy/policy_constants.h"
32 #endif 33 #endif
33 34
34 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) 35 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
35 #include "chrome/browser/crash_upload_list.h" 36 #include "chrome/browser/crash_upload_list.h"
36 #include "components/version_info/version_info_values.h" 37 #include "components/version_info/version_info_values.h"
37 #endif 38 #endif
38 39
39 #if defined(OS_POSIX) 40 #if defined(OS_POSIX)
40 #include "base/debug/dump_without_crashing.h" 41 #include "base/debug/dump_without_crashing.h"
41 #endif 42 #endif
42 43
43 #if defined(OS_ANDROID) 44 #if defined(OS_ANDROID)
44 #include "chrome/common/descriptors_android.h" 45 #include "chrome/common/descriptors_android.h"
45 #endif 46 #endif
46 47
47 #if defined(OS_CHROMEOS) 48 #if defined(OS_CHROMEOS)
48 #include "chrome/common/chrome_version_info.h" 49 #include "chrome/common/channel_info.h"
49 #include "chromeos/chromeos_switches.h" 50 #include "chromeos/chromeos_switches.h"
50 #endif 51 #endif
51 52
52 namespace chrome { 53 namespace chrome {
53 54
54 namespace { 55 namespace {
55 56
56 #if defined(OS_WIN) 57 #if defined(OS_WIN)
57 // This is the minimum version of google update that is required for deferred 58 // This is the minimum version of google update that is required for deferred
58 // crash uploads to work. 59 // crash uploads to work.
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 #if defined(GOOGLE_CHROME_BUILD) 316 #if defined(GOOGLE_CHROME_BUILD)
316 bool is_official_chrome_build = true; 317 bool is_official_chrome_build = true;
317 #else 318 #else
318 bool is_official_chrome_build = false; 319 bool is_official_chrome_build = false;
319 #endif 320 #endif
320 321
321 #if defined(OS_CHROMEOS) 322 #if defined(OS_CHROMEOS)
322 bool is_guest_session = base::CommandLine::ForCurrentProcess()->HasSwitch( 323 bool is_guest_session = base::CommandLine::ForCurrentProcess()->HasSwitch(
323 chromeos::switches::kGuestSession); 324 chromeos::switches::kGuestSession);
324 bool is_stable_channel = 325 bool is_stable_channel =
325 chrome::VersionInfo::GetChannel() == version_info::Channel::STABLE; 326 chrome::GetChannel() == version_info::Channel::STABLE;
326 327
327 if (is_guest_session && is_stable_channel) 328 if (is_guest_session && is_stable_channel)
328 return false; 329 return false;
329 #endif // defined(OS_CHROMEOS) 330 #endif // defined(OS_CHROMEOS)
330 331
331 #if defined(OS_ANDROID) 332 #if defined(OS_ANDROID)
332 // TODO(jcivelli): we should not initialize the crash-reporter when it was not 333 // TODO(jcivelli): we should not initialize the crash-reporter when it was not
333 // enabled. Right now if it is disabled we still generate the minidumps but we 334 // enabled. Right now if it is disabled we still generate the minidumps but we
334 // do not upload them. 335 // do not upload them.
335 return is_official_chrome_build; 336 return is_official_chrome_build;
(...skipping 12 matching lines...) Expand all
348 bool ChromeCrashReporterClient::EnableBreakpadForProcess( 349 bool ChromeCrashReporterClient::EnableBreakpadForProcess(
349 const std::string& process_type) { 350 const std::string& process_type) {
350 return process_type == switches::kRendererProcess || 351 return process_type == switches::kRendererProcess ||
351 process_type == switches::kPluginProcess || 352 process_type == switches::kPluginProcess ||
352 process_type == switches::kPpapiPluginProcess || 353 process_type == switches::kPpapiPluginProcess ||
353 process_type == switches::kZygoteProcess || 354 process_type == switches::kZygoteProcess ||
354 process_type == switches::kGpuProcess; 355 process_type == switches::kGpuProcess;
355 } 356 }
356 357
357 } // namespace chrome 358 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698