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

Unified Diff: chrome/browser/google/google_update_settings_posix.cc

Issue 8568039: Revert 110235 - chrome: Remove 14 exit time destructors and 2 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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
Index: chrome/browser/google/google_update_settings_posix.cc
===================================================================
--- chrome/browser/google/google_update_settings_posix.cc (revision 110237)
+++ chrome/browser/google/google_update_settings_posix.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,14 +10,9 @@
#include "chrome/common/chrome_paths.h"
namespace google_update {
-
-static std::string& posix_guid() {
- CR_DEFINE_STATIC_LOCAL(std::string, guid, ());
- return guid;
+std::string posix_guid;
}
-} // namespace google_update
-
// File name used in the user data dir to indicate consent.
static const char kConsentToSendStats[] = "Consent To Send Stats";
@@ -29,7 +24,7 @@
std::string tmp_guid;
bool consented = file_util::ReadFileToString(consent_file, &tmp_guid);
if (consented)
- google_update::posix_guid().assign(tmp_guid);
+ google_update::posix_guid.assign(tmp_guid);
return consented;
}
@@ -44,13 +39,13 @@
if (consented) {
if ((!file_util::PathExists(consent_file)) ||
(file_util::PathExists(consent_file) &&
- !google_update::posix_guid().empty())) {
- const char* c_str = google_update::posix_guid().c_str();
- int size = google_update::posix_guid().size();
+ !google_update::posix_guid.empty())) {
+ const char* c_str = google_update::posix_guid.c_str();
+ int size = google_update::posix_guid.size();
return file_util::WriteFile(consent_file, c_str, size) == size;
}
} else {
- google_update::posix_guid().clear();
+ google_update::posix_guid.clear();
return file_util::Delete(consent_file, false);
}
return true;
@@ -65,7 +60,7 @@
return false;
// Since user has consented, write the metrics id to the file.
- google_update::posix_guid() = WideToASCII(client_id);
+ google_update::posix_guid = WideToASCII(client_id);
return GoogleUpdateSettings::SetCollectStatsConsent(true);
}
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.cc ('k') | chrome/browser/metrics/thread_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698