summaryrefslogtreecommitdiff
path: root/chromium/third_party/mtpd/source/string_helpers.cc
blob: dc33c778d367e165f5ada7d13e28d88b4df70109 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2012 The Chromium OS 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 "string_helpers.h"

#include "build_config.h"

// TODO(thestig) Merge these once libchrome catches up to Chromium's base,
// or when mtpd moves into its own repo. http://crbug.com/221123
#if defined(CROS_BUILD)
#include <base/string_util.h>
#else
#include <base/strings/string_util.h>
#endif

namespace mtpd {

std::string EnsureUTF8String(const std::string& str) {
  return IsStringUTF8(str) ? str : "";
}

}  // namespace