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

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

Issue 8480033: CrOs: Remove 29 exit time destructors and 8 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reupload 2 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
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 3c55a678d27a57c37e8eec518f77df46ed4625fc..00384b01fdedd76e033fb3f9295d8a935ce1fd76 100644
--- a/chrome/browser/chromeos/dbus/power_manager_client.cc
+++ b/chrome/browser/chromeos/dbus/power_manager_client.cc
@@ -32,7 +32,9 @@ PowerSupplyStatus::PowerSupplyStatus()
}
const std::string& PowerSupplyStatus::ToString() const {
- static std::string result = "";
+ // 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, ());
base::StringAppendF(&result,
"line_power_on = %s ",
line_power_on ? "true" : "false");
« no previous file with comments | « chrome/browser/chromeos/cros/onc_network_parser.cc ('k') | chrome/browser/chromeos/login/registration_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698