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

Side by Side Diff: components/crash/content/app/crash_keys_win.cc

Issue 1410333006: Enough hacks to make wstring printfs unneeded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // The chunk size without terminator. 49 // The chunk size without terminator.
50 const size_t kChunkSize = static_cast<size_t>( 50 const size_t kChunkSize = static_cast<size_t>(
51 google_breakpad::CustomInfoEntry::kValueMaxLength - 1); 51 google_breakpad::CustomInfoEntry::kValueMaxLength - 1);
52 52
53 int chunk_index = 0; 53 int chunk_index = 0;
54 size_t chunk_start = 0; // Current position inside |path| 54 size_t chunk_start = 0; // Current position inside |path|
55 55
56 for (chunk_start = 0; chunk_start < path.size(); chunk_index++) { 56 for (chunk_start = 0; chunk_start < path.size(); chunk_index++) {
57 size_t chunk_length = std::min(kChunkSize, path.size() - chunk_start); 57 size_t chunk_length = std::min(kChunkSize, path.size() - chunk_start);
58 58
59 custom_entries_.push_back(google_breakpad::CustomInfoEntry( 59 /* custom_entries_.push_back(google_breakpad::CustomInfoEntry(
60 base::StringPrintf(L"plugin-path-chunk-%i", chunk_index + 1).c_str(), 60 base::StringPrintf(L"plugin-path-chunk-%i", chunk_index + 1).c_str(),
61 path.substr(chunk_start, chunk_length).c_str())); 61 path.substr(chunk_start, chunk_length).c_str()));*/
62 62
63 chunk_start += chunk_length; 63 chunk_start += chunk_length;
64 } 64 }
65 } 65 }
66 66
67 // Appends the breakpad dump path to |g_custom_entries|. 67 // Appends the breakpad dump path to |g_custom_entries|.
68 void CrashKeysWin::SetBreakpadDumpPath(CrashReporterClient* crash_client) { 68 void CrashKeysWin::SetBreakpadDumpPath(CrashReporterClient* crash_client) {
69 base::FilePath crash_dumps_dir_path; 69 base::FilePath crash_dumps_dir_path;
70 if (crash_client->GetAlternativeCrashDumpLocation(&crash_dumps_dir_path)) { 70 if (crash_client->GetAlternativeCrashDumpLocation(&crash_dumps_dir_path)) {
71 custom_entries_.push_back(google_breakpad::CustomInfoEntry( 71 custom_entries_.push_back(google_breakpad::CustomInfoEntry(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 std::wstring key_string(key); 184 std::wstring key_string(key);
185 DynamicEntriesMap::iterator it = dynamic_entries_.find(key_string); 185 DynamicEntriesMap::iterator it = dynamic_entries_.find(key_string);
186 if (it == dynamic_entries_.end()) 186 if (it == dynamic_entries_.end())
187 return; 187 return;
188 188
189 it->second->set_value(NULL); 189 it->second->set_value(NULL);
190 } 190 }
191 191
192 } // namespace breakpad 192 } // namespace breakpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698