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

Side by Side Diff: chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser.h

Issue 2867713002: Use OnceCallback on Mojo interfaces in //chrome/common/media_router (Closed)
Patch Set: rebase. +#include Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTION_ PARSER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTION_ PARSER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTION_ PARSER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTION_ PARSER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 18 matching lines...) Expand all
29 using DeviceDescriptionCallback = chrome::mojom::DialDeviceDescriptionParser:: 29 using DeviceDescriptionCallback = chrome::mojom::DialDeviceDescriptionParser::
30 ParseDialDeviceDescriptionCallback; 30 ParseDialDeviceDescriptionCallback;
31 31
32 SafeDialDeviceDescriptionParser(); 32 SafeDialDeviceDescriptionParser();
33 virtual ~SafeDialDeviceDescriptionParser(); 33 virtual ~SafeDialDeviceDescriptionParser();
34 34
35 // Start parsing device description XML file in utility process. 35 // Start parsing device description XML file in utility process.
36 // TODO(crbug.com/702766): Add an enum type describing why utility process 36 // TODO(crbug.com/702766): Add an enum type describing why utility process
37 // fails to parse device description xml. 37 // fails to parse device description xml.
38 virtual void Start(const std::string& xml_text, 38 virtual void Start(const std::string& xml_text,
39 const DeviceDescriptionCallback& callback); 39 DeviceDescriptionCallback callback);
40 40
41 private: 41 private:
42 // Utility client used to send device description parsing task to the utility 42 // Utility client used to send device description parsing task to the utility
43 // process. 43 // process.
44 std::unique_ptr<content::UtilityProcessMojoClient< 44 std::unique_ptr<content::UtilityProcessMojoClient<
45 chrome::mojom::DialDeviceDescriptionParser>> 45 chrome::mojom::DialDeviceDescriptionParser>>
46 utility_process_mojo_client_; 46 utility_process_mojo_client_;
47 47
48 base::ThreadChecker thread_checker_; 48 base::ThreadChecker thread_checker_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(SafeDialDeviceDescriptionParser); 50 DISALLOW_COPY_AND_ASSIGN(SafeDialDeviceDescriptionParser);
51 }; 51 };
52 52
53 } // namespace media_router 53 } // namespace media_router
54 54
55 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTI ON_PARSER_H_ 55 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_SAFE_DIAL_DEVICE_DESCRIPTI ON_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698