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

Side by Side Diff: components/safe_json/safe_json_parser_android.h

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_ 5 #ifndef COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_
6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_ 6 #define COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "components/safe_json/safe_json_parser.h" 10 #include "components/safe_json/safe_json_parser.h"
10 11
11 namespace safe_json { 12 namespace safe_json {
12 13
13 class JsonSanitizer; 14 class JsonSanitizer;
14 15
15 class SafeJsonParserAndroid : public SafeJsonParser { 16 class SafeJsonParserAndroid : public SafeJsonParser {
16 public: 17 public:
17 SafeJsonParserAndroid(const std::string& unsafe_json, 18 SafeJsonParserAndroid(const std::string& unsafe_json,
18 const SuccessCallback& success_callback, 19 const SuccessCallback& success_callback,
19 const ErrorCallback& error_callback); 20 const ErrorCallback& error_callback);
20 21
21 private: 22 private:
22 friend struct base::DefaultDeleter<SafeJsonParserAndroid>; 23 friend std::default_delete<SafeJsonParserAndroid>;
23 24
24 ~SafeJsonParserAndroid() override; 25 ~SafeJsonParserAndroid() override;
25 26
26 void OnSanitizationSuccess(const std::string& sanitized_json); 27 void OnSanitizationSuccess(const std::string& sanitized_json);
27 void OnSanitizationError(const std::string& error); 28 void OnSanitizationError(const std::string& error);
28 29
29 // SafeJsonParser implementation. 30 // SafeJsonParser implementation.
30 void Start() override; 31 void Start() override;
31 32
32 const std::string unsafe_json_; 33 const std::string unsafe_json_;
33 SuccessCallback success_callback_; 34 SuccessCallback success_callback_;
34 ErrorCallback error_callback_; 35 ErrorCallback error_callback_;
35 36
36 DISALLOW_COPY_AND_ASSIGN(SafeJsonParserAndroid); 37 DISALLOW_COPY_AND_ASSIGN(SafeJsonParserAndroid);
37 }; 38 };
38 39
39 } // namespace safe_json 40 } // namespace safe_json
40 41
41 #endif // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_ 42 #endif // COMPONENTS_SAFE_JSON_SAFE_JSON_PARSER_ANDROID_H_
OLDNEW
« no previous file with comments | « components/safe_json/json_sanitizer.cc ('k') | components/search_provider_logos/google_logo_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698