Always set *error when CreateDirectoryAndGetError fails.
[chromium-blink-merge.git] / url / url_canon_icu.h
blob9bfd643eb216e601c1b732cb637e545441fde281
1 // Copyright 2013 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 #ifndef URL_URL_CANON_ICU_H_
6 #define URL_URL_CANON_ICU_H_
8 // ICU integration functions.
10 #include "url/url_canon.h"
11 #include "url/url_export.h"
13 typedef struct UConverter UConverter;
15 namespace url_canon {
17 // An implementation of CharsetConverter that implementations can use to
18 // interface the canonicalizer with ICU's conversion routines.
19 class URL_EXPORT ICUCharsetConverter : public CharsetConverter {
20 public:
21 // Constructs a converter using an already-existing ICU character set
22 // converter. This converter is NOT owned by this object; the lifetime must
23 // be managed by the creator such that it is alive as long as this is.
24 ICUCharsetConverter(UConverter* converter);
26 virtual ~ICUCharsetConverter();
28 virtual void ConvertFromUTF16(const base::char16* input,
29 int input_len,
30 CanonOutput* output);
32 private:
33 // The ICU converter, not owned by this class.
34 UConverter* converter_;
37 } // namespace url_canon
39 #endif // URL_URL_CANON_ICU_H_