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

Side by Side Diff: chrome/utility/profile_import_handler.h

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UTILITY_PROFILE_IMPORT_HANDLER_H_ 5 #ifndef CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_
6 #define CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_ 6 #define CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "chrome/common/importer/profile_import.mojom.h" 14 #include "chrome/common/importer/profile_import.mojom.h"
15 #include "chrome/utility/utility_message_handler.h" 15 #include "chrome/utility/utility_message_handler.h"
16 #include "mojo/public/cpp/bindings/interface_request.h" 16 #include "mojo/public/cpp/bindings/interface_request.h"
17 #include "services/service_manager/public/cpp/bind_source_info.h"
17 18
18 class ExternalProcessImporterBridge; 19 class ExternalProcessImporterBridge;
19 class Importer; 20 class Importer;
20 21
21 namespace base { 22 namespace base {
22 class DictionaryValue; 23 class DictionaryValue;
23 class Thread; 24 class Thread;
24 } 25 }
25 26
26 namespace importer { 27 namespace importer {
27 struct SourceProfile; 28 struct SourceProfile;
28 } 29 }
29 30
30 // Dispatches IPCs for out of process profile import. 31 // Dispatches IPCs for out of process profile import.
31 class ProfileImportHandler : public chrome::mojom::ProfileImport { 32 class ProfileImportHandler : public chrome::mojom::ProfileImport {
32 public: 33 public:
33 ProfileImportHandler(); 34 ProfileImportHandler();
34 ~ProfileImportHandler() override; 35 ~ProfileImportHandler() override;
35 36
36 static void Create( 37 static void Create(const service_manager::BindSourceInfo& source_info,
37 mojo::InterfaceRequest<chrome::mojom::ProfileImport> request); 38 chrome::mojom::ProfileImportRequest request);
38 39
39 private: 40 private:
40 // chrome::mojom::ProfileImport: 41 // chrome::mojom::ProfileImport:
41 void StartImport(const importer::SourceProfile& source_profile, 42 void StartImport(const importer::SourceProfile& source_profile,
42 uint16_t items, 43 uint16_t items,
43 std::unique_ptr<base::DictionaryValue> localized_strings, 44 std::unique_ptr<base::DictionaryValue> localized_strings,
44 chrome::mojom::ProfileImportObserverPtr observer) override; 45 chrome::mojom::ProfileImportObserverPtr observer) override;
45 void CancelImport() override; 46 void CancelImport() override;
46 void ReportImportItemFinished(importer::ImportItem item) override; 47 void ReportImportItemFinished(importer::ImportItem item) override;
47 48
(...skipping 11 matching lines...) Expand all
59 // A bitmask of importer::ImportItem. 60 // A bitmask of importer::ImportItem.
60 uint16_t items_to_import_; 61 uint16_t items_to_import_;
61 62
62 // Importer of the appropriate type (Firefox, Safari, IE, etc.) 63 // Importer of the appropriate type (Firefox, Safari, IE, etc.)
63 scoped_refptr<Importer> importer_; 64 scoped_refptr<Importer> importer_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(ProfileImportHandler); 66 DISALLOW_COPY_AND_ASSIGN(ProfileImportHandler);
66 }; 67 };
67 68
68 #endif // CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_ 69 #endif // CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/utility/media_router/dial_device_description_parser_impl.cc ('k') | chrome/utility/profile_import_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698