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

Side by Side Diff: win8/delegate_execute/crash_server_init.cc

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows fix Created 6 years, 1 month 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 "win8/delegate_execute/crash_server_init.h" 5 #include "win8/delegate_execute/crash_server_init.h"
6 6
7 #include <shlobj.h> 7 #include <shlobj.h>
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <cwchar> 10 #include <cwchar>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 entries, ARRAYSIZE(entries) }; 61 entries, ARRAYSIZE(entries) };
62 return &custom_info; 62 return &custom_info;
63 } 63 }
64 64
65 } // namespace 65 } // namespace
66 66
67 namespace delegate_execute { 67 namespace delegate_execute {
68 68
69 scoped_ptr<google_breakpad::ExceptionHandler> InitializeCrashReporting() { 69 scoped_ptr<google_breakpad::ExceptionHandler> InitializeCrashReporting() {
70 wchar_t temp_path[MAX_PATH + 1] = {0}; 70 wchar_t temp_path[MAX_PATH + 1] = {0};
71 DWORD path_len = ::GetTempPath(MAX_PATH, temp_path); 71 ::GetTempPath(MAX_PATH, temp_path);
72 72
73 base::string16 pipe_name; 73 base::string16 pipe_name;
74 pipe_name = kGoogleUpdatePipeName; 74 pipe_name = kGoogleUpdatePipeName;
75 if (IsRunningSystemInstall()) { 75 if (IsRunningSystemInstall()) {
76 pipe_name += kSystemPrincipalSid; 76 pipe_name += kSystemPrincipalSid;
77 } else { 77 } else {
78 base::string16 user_sid; 78 base::string16 user_sid;
79 if (base::win::GetUserSidString(&user_sid)) { 79 if (base::win::GetUserSidString(&user_sid)) {
80 pipe_name += user_sid; 80 pipe_name += user_sid;
81 } else { 81 } else {
82 // We don't think we're a system install, but we couldn't get the 82 // We don't think we're a system install, but we couldn't get the
83 // user SID. Try connecting to the system-level crash service as a 83 // user SID. Try connecting to the system-level crash service as a
84 // last ditch effort. 84 // last ditch effort.
85 pipe_name += kSystemPrincipalSid; 85 pipe_name += kSystemPrincipalSid;
86 } 86 }
87 } 87 }
88 88
89 return scoped_ptr<google_breakpad::ExceptionHandler>( 89 return scoped_ptr<google_breakpad::ExceptionHandler>(
90 new google_breakpad::ExceptionHandler( 90 new google_breakpad::ExceptionHandler(
91 temp_path, NULL, NULL, NULL, 91 temp_path, NULL, NULL, NULL,
92 google_breakpad::ExceptionHandler::HANDLER_ALL, kLargerDumpType, 92 google_breakpad::ExceptionHandler::HANDLER_ALL, kLargerDumpType,
93 pipe_name.c_str(), GetCustomInfo())); 93 pipe_name.c_str(), GetCustomInfo()));
94 } 94 }
95 95
96 } // namespace delegate_execute 96 } // namespace delegate_execute
OLDNEW
« no previous file with comments | « ui/wm/core/nested_accelerator_controller_unittest.cc ('k') | win8/metro_driver/chrome_app_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698