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

Side by Side Diff: chrome/browser/safe_json_parser.h

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_SAFE_JSON_PARSER_H_ 5 #ifndef CHROME_BROWSER_SAFE_JSON_PARSER_H_
6 #define CHROME_BROWSER_SAFE_JSON_PARSER_H_ 6 #define CHROME_BROWSER_SAFE_JSON_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 18 matching lines...) Expand all
29 typedef base::Callback<void(scoped_ptr<base::Value>)> SuccessCallback; 29 typedef base::Callback<void(scoped_ptr<base::Value>)> SuccessCallback;
30 typedef base::Callback<void(const std::string&)> ErrorCallback; 30 typedef base::Callback<void(const std::string&)> ErrorCallback;
31 31
32 SafeJsonParser(const std::string& unsafe_json, 32 SafeJsonParser(const std::string& unsafe_json,
33 const SuccessCallback& success_callback, 33 const SuccessCallback& success_callback,
34 const ErrorCallback& error_callback); 34 const ErrorCallback& error_callback);
35 35
36 void Start(); 36 void Start();
37 37
38 private: 38 private:
39 virtual ~SafeJsonParser(); 39 ~SafeJsonParser() override;
40 40
41 void StartWorkOnIOThread(); 41 void StartWorkOnIOThread();
42 42
43 void OnJSONParseSucceeded(const base::ListValue& wrapper); 43 void OnJSONParseSucceeded(const base::ListValue& wrapper);
44 void OnJSONParseFailed(const std::string& error_message); 44 void OnJSONParseFailed(const std::string& error_message);
45 45
46 void ReportResults(); 46 void ReportResults();
47 void ReportResultOnUIThread(); 47 void ReportResultOnUIThread();
48 48
49 // Implementing pieces of the UtilityProcessHostClient interface. 49 // Implementing pieces of the UtilityProcessHostClient interface.
50 virtual bool OnMessageReceived(const IPC::Message& message) override; 50 bool OnMessageReceived(const IPC::Message& message) override;
51 51
52 const std::string unsafe_json_; 52 const std::string unsafe_json_;
53 SuccessCallback success_callback_; 53 SuccessCallback success_callback_;
54 ErrorCallback error_callback_; 54 ErrorCallback error_callback_;
55 55
56 scoped_ptr<base::Value> parsed_json_; 56 scoped_ptr<base::Value> parsed_json_;
57 std::string error_; 57 std::string error_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(SafeJsonParser); 59 DISALLOW_COPY_AND_ASSIGN(SafeJsonParser);
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_SAFE_JSON_PARSER_H_ 62 #endif // CHROME_BROWSER_SAFE_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/repost_form_warning_controller.h ('k') | chrome/browser/search/hotword_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698