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

Side by Side Diff: chrome/installer/setup/installer_crash_reporter_client.cc

Issue 1878313003: Convert //chrome/installer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert decompress.cc in mini_installer. Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/installer/setup/installer_crash_reporter_client.h" 5 #include "chrome/installer/setup/installer_crash_reporter_client.h"
6 6
7 #include "base/debug/crash_logging.h" 7 #include "base/debug/crash_logging.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 25 matching lines...) Expand all
36 void InstallerCrashReporterClient::GetProductNameAndVersion( 36 void InstallerCrashReporterClient::GetProductNameAndVersion(
37 const base::FilePath& exe_path, 37 const base::FilePath& exe_path,
38 base::string16* product_name, 38 base::string16* product_name,
39 base::string16* version, 39 base::string16* version,
40 base::string16* special_build, 40 base::string16* special_build,
41 base::string16* channel_name) { 41 base::string16* channel_name) {
42 // Report crashes under the same product name as the browser. This string 42 // Report crashes under the same product name as the browser. This string
43 // MUST match server-side configuration. 43 // MUST match server-side configuration.
44 *product_name = base::ASCIIToUTF16(PRODUCT_SHORTNAME_STRING); 44 *product_name = base::ASCIIToUTF16(PRODUCT_SHORTNAME_STRING);
45 45
46 scoped_ptr<FileVersionInfo> version_info( 46 std::unique_ptr<FileVersionInfo> version_info(
47 FileVersionInfo::CreateFileVersionInfo(exe_path)); 47 FileVersionInfo::CreateFileVersionInfo(exe_path));
48 if (version_info) { 48 if (version_info) {
49 *version = version_info->product_version(); 49 *version = version_info->product_version();
50 *special_build = version_info->special_build(); 50 *special_build = version_info->special_build();
51 } else { 51 } else {
52 *version = L"0.0.0.0-devel"; 52 *version = L"0.0.0.0-devel";
53 } 53 }
54 54
55 GoogleUpdateSettings::GetChromeChannelAndModifiers( 55 GoogleUpdateSettings::GetChromeChannelAndModifiers(
56 !GetIsPerUserInstall(exe_path), channel_name); 56 !GetIsPerUserInstall(exe_path), channel_name);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 bool InstallerCrashReporterClient::GetCrashDumpLocation( 112 bool InstallerCrashReporterClient::GetCrashDumpLocation(
113 base::FilePath* crash_dir) { 113 base::FilePath* crash_dir) {
114 return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir); 114 return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir);
115 } 115 }
116 116
117 size_t InstallerCrashReporterClient::RegisterCrashKeys() { 117 size_t InstallerCrashReporterClient::RegisterCrashKeys() {
118 return installer::RegisterCrashKeys(); 118 return installer::RegisterCrashKeys();
119 } 119 }
120 120
121 bool InstallerCrashReporterClient::IsRunningUnattended() { 121 bool InstallerCrashReporterClient::IsRunningUnattended() {
122 scoped_ptr<base::Environment> env(base::Environment::Create()); 122 std::unique_ptr<base::Environment> env(base::Environment::Create());
123 return env->HasVar(env_vars::kHeadless); 123 return env->HasVar(env_vars::kHeadless);
124 } 124 }
125 125
126 bool InstallerCrashReporterClient::GetCollectStatsConsent() { 126 bool InstallerCrashReporterClient::GetCollectStatsConsent() {
127 #if defined(GOOGLE_CHROME_BUILD) 127 #if defined(GOOGLE_CHROME_BUILD)
128 return GoogleUpdateSettings::GetCollectStatsConsentAtLevel( 128 return GoogleUpdateSettings::GetCollectStatsConsentAtLevel(
129 !is_per_user_install_); 129 !is_per_user_install_);
130 #else 130 #else
131 return false; 131 return false;
132 #endif 132 #endif
(...skipping 28 matching lines...) Expand all
161 } 161 }
162 } 162 }
163 163
164 return false; 164 return false;
165 } 165 }
166 166
167 bool InstallerCrashReporterClient::EnableBreakpadForProcess( 167 bool InstallerCrashReporterClient::EnableBreakpadForProcess(
168 const std::string& process_type) { 168 const std::string& process_type) {
169 return true; 169 return true;
170 } 170 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_worker_unittest.cc ('k') | chrome/installer/setup/installer_crash_reporting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698