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

Side by Side Diff: base/value_conversions.cc

Issue 23540009: test IWYU fixups for base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include iterator in a couple more files Created 7 years, 3 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/value_conversions.h" 5 #include "base/value_conversions.h"
6 6
7 #include <string>
8
9 #include "base/basictypes.h"
7 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
8 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
9 #include "base/time/time.h" 12 #include "base/time/time.h"
10 #include "base/values.h" 13 #include "base/values.h"
11 14
12 namespace base { 15 namespace base {
13 16
14 // |Value| internally stores strings in UTF-8, so we have to convert from the 17 // |Value| internally stores strings in UTF-8, so we have to convert from the
15 // system native code to UTF-8 and back. 18 // system native code to UTF-8 and back.
16 StringValue* CreateFilePathValue(const FilePath& in_value) { 19 StringValue* CreateFilePathValue(const FilePath& in_value) {
(...skipping 20 matching lines...) Expand all
37 std::string str; 40 std::string str;
38 int64 int_value; 41 int64 int_value;
39 if (!value.GetAsString(&str) || !base::StringToInt64(str, &int_value)) 42 if (!value.GetAsString(&str) || !base::StringToInt64(str, &int_value))
40 return false; 43 return false;
41 if (time) 44 if (time)
42 *time = TimeDelta::FromInternalValue(int_value); 45 *time = TimeDelta::FromInternalValue(int_value);
43 return true; 46 return true;
44 } 47 }
45 48
46 } // namespace base 49 } // namespace base
OLDNEW
« no previous file with comments | « base/tracking_info.h ('k') | base/values.h » ('j') | sync/notifier/p2p_invalidator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698