Remove linux_chromium_gn_dbg from the chromium CQ.
[chromium-blink-merge.git] / base / json / json_value_converter.cc
blob6f772f366b8b5cff1c4e0d6e783fd18023dbcb0c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/json/json_value_converter.h"
7 namespace base {
8 namespace internal {
10 bool BasicValueConverter<int>::Convert(
11 const base::Value& value, int* field) const {
12 return value.GetAsInteger(field);
15 bool BasicValueConverter<std::string>::Convert(
16 const base::Value& value, std::string* field) const {
17 return value.GetAsString(field);
20 bool BasicValueConverter<string16>::Convert(
21 const base::Value& value, string16* field) const {
22 return value.GetAsString(field);
25 bool BasicValueConverter<double>::Convert(
26 const base::Value& value, double* field) const {
27 return value.GetAsDouble(field);
30 bool BasicValueConverter<bool>::Convert(
31 const base::Value& value, bool* field) const {
32 return value.GetAsBoolean(field);
35 } // namespace internal
36 } // namespace base