Skip to content

Commit

Permalink
Revert r206949 - "Start moving breakpad integration to a component."
Browse files Browse the repository at this point in the history
I'll use a different approach to move breakpad to a component.

> Step 1: move the DIR_CRASH_DUMPS symbol to the component
>
> BUG=247431
>
> Review URL: https://chromiumcodereview.appspot.com/16924012

TBR=thestig@chromium.org

Review URL: https://chromiumcodereview.appspot.com/18277002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209356 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jochen@chromium.org committed Jun 29, 2013
1 parent 4183461 commit d0f837d
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 100 deletions.
1 change: 0 additions & 1 deletion chrome/app/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include_rules = [
"+chrome/renderer/chrome_content_renderer_client.h",
"+chrome/utility/chrome_content_utility_client.h",
"+chromeos/chromeos_paths.h",
"+components/breakpad/common/breakpad_paths.h",
"+components/nacl/common",
"+content/public/app",
"+content/public/browser/browser_main_runner.h",
Expand Down
6 changes: 3 additions & 3 deletions chrome/app/breakpad_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
#include "chrome/app/breakpad_linux_impl.h"
#include "chrome/browser/crash_upload_list.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info_posix.h"
#include "chrome/common/crash_keys.h"
#include "chrome/common/dump_without_crashing.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/logging_chrome.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "content/public/common/content_descriptors.h"

#if defined(OS_ANDROID)
Expand Down Expand Up @@ -533,7 +533,7 @@ void EnableCrashDumping(bool unattended) {
PathService::Get(base::DIR_TEMP, &tmp_path);

base::FilePath dumps_path(tmp_path);
if (PathService::Get(breakpad::DIR_CRASH_DUMPS, &dumps_path)) {
if (PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path)) {
base::FilePath logfile =
dumps_path.AppendASCII(CrashUploadList::kReporterLogFilename);
std::string logfile_str = logfile.value();
Expand Down Expand Up @@ -1465,7 +1465,7 @@ void InitCrashReporter() {
base::FilePath alternate_minidump_location_path(
alternate_minidump_location);
PathService::Override(
breakpad::DIR_CRASH_DUMPS,
chrome::DIR_CRASH_DUMPS,
base::FilePath(alternate_minidump_location));
}

Expand Down
6 changes: 3 additions & 3 deletions chrome/app/breakpad_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
#include "base/threading/thread_restrictions.h"
#import "breakpad/src/client/mac/Framework/Breakpad.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/crash_keys.h"
#include "chrome/common/dump_without_crashing.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/installer/util/google_update_settings.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "components/nacl/common/nacl_switches.h"
#include "native_client/src/trusted/service_runtime/osx/crash_filter.h"
#include "policy/policy_constants.h"
Expand Down Expand Up @@ -250,7 +250,7 @@ void InitCrashReporter() {
" doesn't exist";
} else {
PathService::Override(
breakpad::DIR_CRASH_DUMPS,
chrome::DIR_CRASH_DUMPS,
base::FilePath(alternate_minidump_location));
if (is_browser) {
// Print out confirmation message to the stdout, but only print
Expand All @@ -262,7 +262,7 @@ void InitCrashReporter() {
}

base::FilePath dir_crash_dumps;
PathService::Get(breakpad::DIR_CRASH_DUMPS, &dir_crash_dumps);
PathService::Get(chrome::DIR_CRASH_DUMPS, &dir_crash_dumps);
[breakpad_config setObject:base::SysUTF8ToNSString(dir_crash_dumps.value())
forKey:@BREAKPAD_DUMP_DIRECTORY];

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ include_rules = [
"+components/autofill/core/browser",
"+components/autofill/core/common",
"+components/auto_login_parser",
"+components/breakpad",
"+components/browser_context_keyed_service",
"+components/nacl/common",
"+components/navigation_interception",
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/android/crash_dump_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include "base/rand_util.h"
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/descriptors_android.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/file_descriptor_info.h"
Expand Down Expand Up @@ -100,7 +100,7 @@ void CrashDumpManager::ProcessMinidump(const base::FilePath& minidump_path,
// We are dealing with a valid minidump. Copy it to the crash report
// directory from where Java code will upload it later on.
base::FilePath crash_dump_dir;
r = PathService::Get(breakpad::DIR_CRASH_DUMPS, &crash_dump_dir);
r = PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_dir);
if (!r) {
NOTREACHED() << "Failed to retrieve the crash dump directory.";
return;
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/automation/testing_automation_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
#include "chrome/common/automation_messages.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/background_info.h"
#include "chrome/common/extensions/extension.h"
Expand All @@ -120,7 +121,6 @@
#include "chrome/common/extensions/permissions/permissions_data.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/favicon_status.h"
Expand Down Expand Up @@ -2238,7 +2238,7 @@ void TestingAutomationProvider::GetBrowserInfo(
properties->SetString("command_line_string",
CommandLine::ForCurrentProcess()->GetCommandLineString());
base::FilePath dumps_path;
PathService::Get(breakpad::DIR_CRASH_DUMPS, &dumps_path);
PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path);
properties->SetString("DIR_CRASH_DUMPS", dumps_path.value());
#if defined(USE_AURA)
properties->SetBoolean("aura", true);
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/crash_handler_host_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include "breakpad/src/client/linux/minidump_writer/linux_dumper.h"
#include "breakpad/src/client/linux/minidump_writer/minidump_writer.h"
#include "chrome/app/breakpad_linux_impl.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/env_vars.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "content/public/browser/browser_thread.h"

#if defined(OS_ANDROID)
Expand Down Expand Up @@ -379,7 +379,7 @@ void CrashHandlerHostLinux::WriteDumpFile(BreakpadInfo* info,
base::FilePath dumps_path("/tmp");
PathService::Get(base::DIR_TEMP, &dumps_path);
if (!info->upload)
PathService::Get(breakpad::DIR_CRASH_DUMPS, &dumps_path);
PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path);
const uint64 rand = base::RandUint64();
const std::string minidump_filename =
base::StringPrintf("%s/chromium-%s-minidump-%016" PRIx64 ".dmp",
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/crash_upload_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@

#include "base/files/file_path.h"
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"
#if defined(OS_WIN)
#include "chrome/browser/crash_upload_list_win.h"
#endif
#include "components/breakpad/common/breakpad_paths.h"

// static
const char* CrashUploadList::kReporterLogFilename = "uploads.log";

// static
CrashUploadList* CrashUploadList::Create(Delegate* delegate) {
base::FilePath crash_dir_path;
PathService::Get(breakpad::DIR_CRASH_DUMPS, &crash_dir_path);
PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dir_path);
base::FilePath upload_log_path =
crash_dir_path.AppendASCII(kReporterLogFilename);
#if defined(OS_WIN)
Expand Down
1 change: 0 additions & 1 deletion chrome/chrome_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
'<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
'<(DEPTH)/chrome/chrome_resources.gyp:theme_resources',
'<(DEPTH)/chrome/common_constants.gyp:common_constants',
'<(DEPTH)/components/components.gyp:breakpad_common',
'<(DEPTH)/components/components.gyp:visitedlink_common',
'<(DEPTH)/content/content.gyp:content_common',
'<(DEPTH)/net/net.gyp:net',
Expand Down
1 change: 0 additions & 1 deletion chrome/common/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include_rules = [
"+breakpad", # For Breakpad constants.
"+chromeos", # For chromeos_switches.h
"+components/autofill/core/common",
"+components/breakpad/common",
"+components/nacl/common",
"+device/bluetooth", # For BluetoothDevicePermission
"+device/media_transfer_protocol", # For MediaTransferProtocolManager
Expand Down
40 changes: 18 additions & 22 deletions chrome/common/chrome_paths.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/widevine_cdm_constants.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "ui/base/ui_base_paths.h"

#if defined(OS_ANDROID)
Expand Down Expand Up @@ -191,6 +190,24 @@ bool PathProvider(int key, base::FilePath* result) {
// and annoyed a lot of users.
#endif
break;
case chrome::DIR_CRASH_DUMPS:
#if defined(OS_CHROMEOS)
// ChromeOS uses a separate directory. See http://crosbug.com/25089
cur = base::FilePath("/var/log/chrome");
#elif defined(OS_ANDROID)
if (!base::android::GetCacheDirectory(&cur))
return false;
#else
// The crash reports are always stored relative to the default user data
// directory. This avoids the problem of having to re-initialize the
// exception handler after parsing command line options, which may
// override the location of the app's profile directory.
if (!GetDefaultUserDataDirectory(&cur))
return false;
#endif
cur = cur.Append(FILE_PATH_LITERAL("Crash Reports"));
create_dir = true;
break;
case chrome::DIR_RESOURCES:
#if defined(OS_MACOSX)
cur = base::mac::FrameworkBundlePath();
Expand Down Expand Up @@ -479,25 +496,6 @@ bool PathProvider(int key, base::FilePath* result) {
#endif
break;

case breakpad::DIR_CRASH_DUMPS:
#if defined(OS_CHROMEOS)
// ChromeOS uses a separate directory. See http://crosbug.com/25089
cur = base::FilePath("/var/log/chrome");
#elif defined(OS_ANDROID)
if (!base::android::GetCacheDirectory(&cur))
return false;
#else
// The crash reports are always stored relative to the default user data
// directory. This avoids the problem of having to re-initialize the
// exception handler after parsing command line options, which may
// override the location of the app's profile directory.
if (!GetDefaultUserDataDirectory(&cur))
return false;
#endif
cur = cur.Append(FILE_PATH_LITERAL("Crash Reports"));
create_dir = true;
break;

default:
return false;
}
Expand All @@ -514,8 +512,6 @@ bool PathProvider(int key, base::FilePath* result) {
// eliminate this object file if there is no direct entry point into it.
void RegisterPathProvider() {
PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
PathService::RegisterProvider(
PathProvider, breakpad::PATH_START, breakpad::PATH_END);
}

} // namespace chrome
1 change: 1 addition & 0 deletions chrome/common/chrome_paths.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum {
DIR_APP = PATH_START, // Directory where dlls and data reside.
DIR_LOGS, // Directory where logs should be written.
DIR_USER_DATA, // Directory where user data can be written.
DIR_CRASH_DUMPS, // Directory where crash dumps are written.
DIR_RESOURCES, // Directory containing separate file resources
// used by Chrome at runtime.
DIR_INSPECTOR, // Directory where web inspector is located.
Expand Down
4 changes: 2 additions & 2 deletions chrome/test/reliability/automated_ui_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/url_constants.h"
Expand All @@ -35,7 +36,6 @@
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/reliability/automated_ui_tests.h"
#include "chrome/test/ui/ui_test.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "googleurl/src/gurl.h"
#include "ui/base/keycodes/keyboard_codes.h"

Expand Down Expand Up @@ -767,7 +767,7 @@ void AutomatedUITest::LogInfoMessage(const std::string& info) {
base::FilePath AutomatedUITest::GetMostRecentCrashDump() {
base::FilePath crash_dump_path;
base::FilePath most_recent_file_name;
PathService::Get(breakpad::DIR_CRASH_DUMPS, &crash_dump_path);
PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_path);
base::Time most_recent_file_time;

bool first_file = true;
Expand Down
3 changes: 1 addition & 2 deletions chrome/test/reliability/page_load_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "net/base/net_util.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "v8/include/v8-testing.h"
Expand Down Expand Up @@ -635,7 +634,7 @@ class PageLoadTest : public UITest {
crash_dumps_dir_path_ = base::FilePath::FromUTF8Unsafe(
alternate_minidump_location);
} else {
PathService::Get(breakpad::DIR_CRASH_DUMPS, &crash_dumps_dir_path_);
PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dumps_dir_path_);
}

base::FileEnumerator enumerator(crash_dumps_dir_path_,
Expand Down
3 changes: 1 addition & 2 deletions chrome/test/ui/ui_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#include "chrome/test/base/test_launcher_utils.h"
#include "chrome/test/base/test_switches.h"
#include "chrome/test/base/testing_profile.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "ui/gl/gl_implementation.h"
Expand Down Expand Up @@ -425,7 +424,7 @@ bool UITestBase::CloseBrowser(BrowserProxy* browser,

int UITestBase::GetCrashCount() const {
base::FilePath crash_dump_path;
PathService::Get(breakpad::DIR_CRASH_DUMPS, &crash_dump_path);
PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_path);

int files_found = 0;
base::FileEnumerator en(crash_dump_path, false, base::FileEnumerator::FILES);
Expand Down
1 change: 0 additions & 1 deletion chrome/tools/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ include_rules = [
"+breakpad",
"+chrome/browser",
"+chrome/third_party/hunspell/google",
"+components/breakpad",
"+content/browser",
"+content/public/browser",
]
3 changes: 1 addition & 2 deletions chrome/tools/crash_service/crash_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "breakpad/src/client/windows/sender/crash_report_sender.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "components/breakpad/common/breakpad_paths.h"

namespace {

Expand Down Expand Up @@ -198,7 +197,7 @@ bool CrashService::Initialize(const std::wstring& command_line) {
if (cmd_line.HasSwitch(kDumpsDir)) {
dumps_path = base::FilePath(cmd_line.GetSwitchValueNative(kDumpsDir));
} else {
if (!PathService::Get(breakpad::DIR_CRASH_DUMPS, &dumps_path)) {
if (!PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path)) {
LOG(ERROR) << "could not get DIR_CRASH_DUMPS";
return false;
}
Expand Down
3 changes: 1 addition & 2 deletions chrome_frame/test/reliability/page_load_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#include "chrome_frame/test/ie_event_sink.h"
#include "chrome_frame/test/reliability/page_load_test.h"
#include "chrome_frame/utils.h"
#include "components/breakpad/common/breakpad_paths.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread.h"
#include "net/base/net_util.h"
Expand Down Expand Up @@ -333,7 +332,7 @@ class PageLoadTest : public testing::Test {
protected:
virtual void SetUp() {
// Initialize crash_dumps_dir_path_.
PathService::Get(breakpad::DIR_CRASH_DUMPS, &crash_dumps_dir_path_);
PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dumps_dir_path_);
base::FileEnumerator enumerator(crash_dumps_dir_path_,
false, // not recursive
base::FileEnumerator::FILES);
Expand Down
4 changes: 0 additions & 4 deletions components/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ per-file autofill*=dhollowa@chromium.org
per-file autofill*=isherman@chromium.org
per-file autofill*=kaiwang@chromium.org

per-file breakpad.gypi=jochen@chromium.org
per-file breakpad.gypi=rsesek@chromium.org
per-file breakpad.gypi=thestig@chromium.org

per-file tracing*=jbauman@chromium.org
per-file tracing*=nduca@chromium.org

Expand Down
19 changes: 0 additions & 19 deletions components/breakpad.gypi

This file was deleted.

3 changes: 0 additions & 3 deletions components/breakpad/OWNERS

This file was deleted.

Loading

0 comments on commit d0f837d

Please sign in to comment.