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

Unified Diff: chrome/chrome_watcher/system_load_estimator.cc

Issue 2018543002: Fix -Wwritable-strings warnings in kasko code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/chrome_watcher/system_load_estimator.cc
diff --git a/chrome/chrome_watcher/system_load_estimator.cc b/chrome/chrome_watcher/system_load_estimator.cc
index 5e0c375fcffb54fd3e06af5ee170c771d009e0b2..c547039b97a2c05f2b1419b012f59914918249dd 100644
--- a/chrome/chrome_watcher/system_load_estimator.cc
+++ b/chrome/chrome_watcher/system_load_estimator.cc
@@ -23,13 +23,14 @@ uint64_t FileTimeToUInt64(FILETIME time) {
}
CounterHandle AddPdhCounter(PDH_HQUERY query,
- wchar_t* object_name,
- wchar_t* counter_name) {
+ const wchar_t* object_name,
+ const wchar_t* counter_name) {
DCHECK(counter_name);
// Get the counter's path.
PDH_COUNTER_PATH_ELEMENTS path_elements = {
- nullptr, object_name, nullptr, nullptr, 0, counter_name};
+ nullptr, const_cast<LPTSTR>(object_name), nullptr, nullptr,
+ 0, const_cast<LPTSTR>(counter_name)};
std::unique_ptr<wchar_t[]> counter_path(new wchar_t[PDH_MAX_COUNTER_PATH]);
DWORD path_len = PDH_MAX_COUNTER_PATH;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698