From ff2758f5f089dee85a030cb70bea2b3bad38c8fa Mon Sep 17 00:00:00 2001 From: "mpcomplete@chromium.org" Date: Mon, 11 Jun 2012 23:49:55 +0000 Subject: Revert r141537: Add extensions::StateStore and use that instead of ExtensionPrefs for persisting alarm state to disk. More to come: - context menus - omnibox - declarative webRequest TBR=yoz@chromium.org BUG=123366 TEST=extension alarms are still remembered after chrome restart Reason for revert: breaks tests on Win7. Review URL: https://chromiumcodereview.appspot.com/10542114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141564 0039d316-1c4b-4281-b951-d872f2087c98 --- base/value_conversions.cc | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'base/value_conversions.cc') diff --git a/base/value_conversions.cc b/base/value_conversions.cc index caf9d72..f4957a4 100644 --- a/base/value_conversions.cc +++ b/base/value_conversions.cc @@ -1,12 +1,10 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. #include "base/value_conversions.h" #include "base/file_path.h" -#include "base/string_number_conversions.h" -#include "base/time.h" #include "base/values.h" namespace base { @@ -26,21 +24,4 @@ bool GetValueAsFilePath(const Value& value, FilePath* file_path) { return true; } -// |Value| does not support 64-bit integers, and doubles do not have enough -// precision, so we store the 64-bit time value as a string instead. -StringValue* CreateTimeValue(const Time& time) { - std::string string_value = base::Int64ToString(time.ToInternalValue()); - return new StringValue(string_value); -} - -bool GetValueAsTime(const Value& value, Time* time) { - std::string str; - int64 int_value; - if (!value.GetAsString(&str) || !base::StringToInt64(str, &int_value)) - return false; - if (time) - *time = base::Time::FromInternalValue(int_value); - return true; -} - } // namespace base -- cgit v1.1