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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h

Issue 2751573004: Image writer client: create mojo client with MakeUnique<> (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 virtual void Shutdown(); 58 virtual void Shutdown();
59 59
60 protected: 60 protected:
61 friend class base::RefCountedThreadSafe<ImageWriterUtilityClient>; 61 friend class base::RefCountedThreadSafe<ImageWriterUtilityClient>;
62 62
63 virtual ~ImageWriterUtilityClient(); 63 virtual ~ImageWriterUtilityClient();
64 64
65 private: 65 private:
66 class RemovableStorageWriterClientImpl; 66 class RemovableStorageWriterClientImpl;
67 67
68 // Ensures the utility process has been created. 68 void StartUtilityProcessIfNeeded();
69 void StartUtilityProcess();
70
71 void UtilityProcessError(); 69 void UtilityProcessError();
72 70
73 void OperationProgress(int64_t progress); 71 void OperationProgress(int64_t progress);
74 void OperationSucceeded(); 72 void OperationSucceeded();
75 void OperationFailed(const std::string& error); 73 void OperationFailed(const std::string& error);
76 74
77 void ResetRequest(); 75 void ResetRequest();
78 76
79 ProgressCallback progress_callback_; 77 ProgressCallback progress_callback_;
80 SuccessCallback success_callback_; 78 SuccessCallback success_callback_;
81 ErrorCallback error_callback_; 79 ErrorCallback error_callback_;
82 80
83 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 81 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
84 82
85 std::unique_ptr<content::UtilityProcessMojoClient< 83 std::unique_ptr<content::UtilityProcessMojoClient<
86 extensions::mojom::RemovableStorageWriter>> 84 extensions::mojom::RemovableStorageWriter>>
87 utility_process_mojo_client_; 85 utility_process_mojo_client_;
88 86
89 std::unique_ptr<RemovableStorageWriterClientImpl> 87 std::unique_ptr<RemovableStorageWriterClientImpl>
90 removable_storage_writer_client_; 88 removable_storage_writer_client_;
91 89
92 DISALLOW_COPY_AND_ASSIGN(ImageWriterUtilityClient); 90 DISALLOW_COPY_AND_ASSIGN(ImageWriterUtilityClient);
93 }; 91 };
94 92
95 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILI TY_CLIENT_H_ 93 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILI TY_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698