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

Unified Diff: chrome/browser/chromeos/dbus/power_manager_client.cc

Issue 8616003: chromeos: remove static modifier in ToString func (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/dbus/power_manager_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dbus/power_manager_client.cc
diff --git a/chrome/browser/chromeos/dbus/power_manager_client.cc b/chrome/browser/chromeos/dbus/power_manager_client.cc
index 00384b01fdedd76e033fb3f9295d8a935ce1fd76..5b95f0e1cf3016ad4d71f230b85afec18fd9543c 100644
--- a/chrome/browser/chromeos/dbus/power_manager_client.cc
+++ b/chrome/browser/chromeos/dbus/power_manager_client.cc
@@ -31,10 +31,8 @@ PowerSupplyStatus::PowerSupplyStatus()
battery_percentage(0) {
}
-const std::string& PowerSupplyStatus::ToString() const {
- // TODO(thakis): This looks weird. This should probably not be static, and
- // the function should just return a string by value.
- CR_DEFINE_STATIC_LOCAL(std::string, result, ());
+std::string PowerSupplyStatus::ToString() const {
+ std::string result;
base::StringAppendF(&result,
"line_power_on = %s ",
line_power_on ? "true" : "false");
« no previous file with comments | « chrome/browser/chromeos/dbus/power_manager_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698