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

Side by Side Diff: base/json/string_escape.h

Issue 10735044: Remove #pragma once. Just from base/ for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/json/json_writer.h ('k') | base/lazy_instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file defines utility functions for escaping strings. 5 // This file defines utility functions for escaping strings.
6 6
7 #ifndef BASE_JSON_STRING_ESCAPE_H_ 7 #ifndef BASE_JSON_STRING_ESCAPE_H_
8 #define BASE_JSON_STRING_ESCAPE_H_ 8 #define BASE_JSON_STRING_ESCAPE_H_
9 #pragma once
10 9
11 #include <string> 10 #include <string>
12 11
13 #include "base/base_export.h" 12 #include "base/base_export.h"
14 #include "base/string16.h" 13 #include "base/string16.h"
15 14
16 namespace base { 15 namespace base {
17 16
18 // Escape |str| appropriately for a JSON string literal, _appending_ the 17 // Escape |str| appropriately for a JSON string literal, _appending_ the
19 // result to |dst|. This will create unicode escape sequences (\uXXXX). 18 // result to |dst|. This will create unicode escape sequences (\uXXXX).
(...skipping 10 matching lines...) Expand all
30 BASE_EXPORT void JsonDoubleQuote(const string16& str, 29 BASE_EXPORT void JsonDoubleQuote(const string16& str,
31 bool put_in_quotes, 30 bool put_in_quotes,
32 std::string* dst); 31 std::string* dst);
33 32
34 // Same as above, but always returns the result double quoted. 33 // Same as above, but always returns the result double quoted.
35 BASE_EXPORT std::string GetDoubleQuotedJson(const string16& str); 34 BASE_EXPORT std::string GetDoubleQuotedJson(const string16& str);
36 35
37 } // namespace base 36 } // namespace base
38 37
39 #endif // BASE_JSON_STRING_ESCAPE_H_ 38 #endif // BASE_JSON_STRING_ESCAPE_H_
OLDNEW
« no previous file with comments | « base/json/json_writer.h ('k') | base/lazy_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698