| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/crash/content/app/crash_keys_win.h" | 5 #include "components/crash/content/app/crash_keys_win.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 MOCK_METHOD5(GetProductNameAndVersion, void(const base::string16& exe_path, | 28 MOCK_METHOD5(GetProductNameAndVersion, void(const base::string16& exe_path, |
| 29 base::string16* product_name, | 29 base::string16* product_name, |
| 30 base::string16* version, | 30 base::string16* version, |
| 31 base::string16* special_build, | 31 base::string16* special_build, |
| 32 base::string16* channel_name)); | 32 base::string16* channel_name)); |
| 33 MOCK_METHOD3(ShouldShowRestartDialog, bool(base::string16* title, | 33 MOCK_METHOD3(ShouldShowRestartDialog, bool(base::string16* title, |
| 34 base::string16* message, | 34 base::string16* message, |
| 35 bool* is_rtl_locale)); | 35 bool* is_rtl_locale)); |
| 36 MOCK_METHOD0(AboutToRestart, bool()); | 36 MOCK_METHOD0(AboutToRestart, bool()); |
| 37 MOCK_METHOD1(GetDeferredUploadsSupported, bool(bool is_per_user_install)); | 37 MOCK_METHOD1(GetDeferredUploadsSupported, bool(bool is_per_user_install)); |
| 38 MOCK_METHOD1(GetIsPerUserInstall, bool(const base::string16& exe_path)); | 38 MOCK_METHOD0(GetIsPerUserInstall, bool()); |
| 39 MOCK_METHOD1(GetShouldDumpLargerDumps, bool(bool is_per_user_install)); | 39 MOCK_METHOD0(GetShouldDumpLargerDumps, bool()); |
| 40 MOCK_METHOD0(GetResultCodeRespawnFailed, int()); | 40 MOCK_METHOD0(GetResultCodeRespawnFailed, int()); |
| 41 MOCK_METHOD0(InitBrowserCrashDumpsRegKey, void()); | 41 MOCK_METHOD0(InitBrowserCrashDumpsRegKey, void()); |
| 42 MOCK_METHOD1(RecordCrashDumpAttempt, void(bool is_real_crash)); | 42 MOCK_METHOD1(RecordCrashDumpAttempt, void(bool is_real_crash)); |
| 43 | 43 |
| 44 MOCK_METHOD2(GetProductNameAndVersion, void(std::string* product_name, | 44 MOCK_METHOD2(GetProductNameAndVersion, void(std::string* product_name, |
| 45 std::string* version)); | 45 std::string* version)); |
| 46 MOCK_METHOD0(GetReporterLogFilename, base::FilePath()); | 46 MOCK_METHOD0(GetReporterLogFilename, base::FilePath()); |
| 47 MOCK_METHOD1(GetCrashDumpLocation, bool(base::string16* crash_dir)); | 47 MOCK_METHOD1(GetCrashDumpLocation, bool(base::string16* crash_dir)); |
| 48 MOCK_METHOD0(RegisterCrashKeys, size_t()); | 48 MOCK_METHOD0(RegisterCrashKeys, size_t()); |
| 49 MOCK_METHOD0(IsRunningUnattended, bool()); | 49 MOCK_METHOD0(IsRunningUnattended, bool()); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"plat", L"Win32")); | 135 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"plat", L"Win32")); |
| 136 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"ptype", L"made_up_type")); | 136 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"ptype", L"made_up_type")); |
| 137 std::wstring pid_str(base::StringPrintf(L"%d", ::GetCurrentProcessId())); | 137 std::wstring pid_str(base::StringPrintf(L"%d", ::GetCurrentProcessId())); |
| 138 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"pid", pid_str.c_str())); | 138 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"pid", pid_str.c_str())); |
| 139 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"channel", L"-devm")); | 139 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"channel", L"-devm")); |
| 140 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"profile-type", L"temporary")); | 140 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"profile-type", L"temporary")); |
| 141 EXPECT_EQ(256u, CountKeyValueOccurences(info, L"unspecified-crash-key", L"")); | 141 EXPECT_EQ(256u, CountKeyValueOccurences(info, L"unspecified-crash-key", L"")); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace breakpad | 144 } // namespace breakpad |
| OLD | NEW |