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

Side by Side Diff: chrome/browser/chromeos/system/input_device_settings.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/system/input_device_settings.h" 5 #include "chrome/browser/chromeos/system/input_device_settings.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 va_end(vl); 59 va_end(vl);
60 60
61 content::BrowserThread::GetBlockingPool()->PostTask(FROM_HERE, 61 content::BrowserThread::GetBlockingPool()->PostTask(FROM_HERE,
62 base::Bind(&ExecuteScriptOnFileThread, argv)); 62 base::Bind(&ExecuteScriptOnFileThread, argv));
63 } 63 }
64 64
65 void SetPointerSensitivity(const char* script, int value) { 65 void SetPointerSensitivity(const char* script, int value) {
66 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 66 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
67 DCHECK(value > 0 && value < 6); 67 DCHECK(value > 0 && value < 6);
68 ExecuteScript(3, script, "sensitivity", StringPrintf("%d", value).c_str()); 68 ExecuteScript(
69 3, script, "sensitivity", base::StringPrintf("%d", value).c_str());
69 } 70 }
70 71
71 void SetTPControl(const char* control, bool enabled) { 72 void SetTPControl(const char* control, bool enabled) {
72 ExecuteScript(3, kTpControl, control, enabled ? "on" : "off"); 73 ExecuteScript(3, kTpControl, control, enabled ? "on" : "off");
73 } 74 }
74 75
75 void DeviceExistsBlockingPool(const char* script, bool* exists) { 76 void DeviceExistsBlockingPool(const char* script, bool* exists) {
76 DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); 77 DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
77 *exists = false; 78 *exists = false;
78 if (!ScriptExists(script)) 79 if (!ScriptExists(script))
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 157
157 void SetPrimaryButtonRight(bool right) { 158 void SetPrimaryButtonRight(bool right) {
158 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 159 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
159 ExecuteScript(3, kMouseControl, "swap_left_right", right ? "1" : "0"); 160 ExecuteScript(3, kMouseControl, "swap_left_right", right ? "1" : "0");
160 } 161 }
161 162
162 } // namespace mouse_settings 163 } // namespace mouse_settings
163 164
164 } // namespace system 165 } // namespace system
165 } // namespace chromeos 166 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698