summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/google_update_settings.cc
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 22:38:12 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 22:38:12 +0000
commit529272291081f31a853b4f504eecf17d65b263d8 (patch)
tree7cb41b53fef4b1f7d978db8c148bef6b9fad447a /chrome/installer/util/google_update_settings.cc
parent4a8adfa0f2cc19d7991c45459c7760ae9a78569e (diff)
downloadchromium_src-529272291081f31a853b4f504eecf17d65b263d8.zip
chromium_src-529272291081f31a853b4f504eecf17d65b263d8.tar.gz
chromium_src-529272291081f31a853b4f504eecf17d65b263d8.tar.bz2
Makes omaha experiment label utility functions cross-platform.
A number of utility methods needed to build experiment strings to pass to omaha are currently windows-only. This CL moves those functions into a location where they can be used on all platforms. BUG=222133 TEST=No visible impact Review URL: https://chromiumcodereview.appspot.com/12693006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/google_update_settings.cc')
-rw-r--r--chrome/installer/util/google_update_settings.cc34
1 files changed, 0 insertions, 34 deletions
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index 21eb623..7631e22 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -9,7 +9,6 @@
#include "base/command_line.h"
#include "base/path_service.h"
#include "base/string_util.h"
-#include "base/stringprintf.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "base/time.h"
@@ -39,13 +38,6 @@ const GoogleUpdateSettings::UpdatePolicy kGoogleUpdateDefaultUpdatePolicy =
GoogleUpdateSettings::UPDATES_DISABLED;
#endif
-const wchar_t* const kDays[] =
- { L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat" };
-
-const wchar_t* const kMonths[] =
- { L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", L"Jul", L"Aug", L"Sep",
- L"Oct", L"Nov", L"Dec"};
-
bool ReadGoogleUpdateStrKey(const wchar_t* const name, std::wstring* value) {
// The registry functions below will end up going to disk. Do this on another
// thread to avoid slowing the IO thread. http://crbug.com/62121
@@ -716,29 +708,3 @@ bool GoogleUpdateSettings::ReadExperimentLabels(
return result == ERROR_SUCCESS;
}
-
-string16 GoogleUpdateSettings::BuildExperimentDateString() {
- // The Google Update experiment_labels timestamp format is:
- // "DAY, DD0 MON YYYY HH0:MI0:SE0 TZ"
- // DAY = 3 character day of week,
- // DD0 = 2 digit day of month,
- // MON = 3 character month of year,
- // YYYY = 4 digit year,
- // HH0 = 2 digit hour,
- // MI0 = 2 digit minute,
- // SE0 = 2 digit second,
- // TZ = 3 character timezone
- base::Time::Exploded then = {};
- base::Time::Now().UTCExplode(&then);
- then.year += 1;
- DCHECK(then.HasValidValues());
-
- return base::StringPrintf(L"%ls, %02d %ls %d %02d:%02d:%02d GMT",
- kDays[then.day_of_week],
- then.day_of_month,
- kMonths[then.month - 1],
- then.year,
- then.hour,
- then.minute,
- then.second);
-}