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

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

Issue 336923002: Adds API test for imageWriterPrivate.writeFromFile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chrome OS fixes. Created 6 years, 5 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_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // Aborts the operation, cancelling it and generating an error. 68 // Aborts the operation, cancelling it and generating an error.
69 void Abort(); 69 void Abort();
70 70
71 // Informational getters. 71 // Informational getters.
72 int GetProgress(); 72 int GetProgress();
73 image_writer_api::Stage GetStage(); 73 image_writer_api::Stage GetStage();
74 74
75 #if !defined(OS_CHROMEOS) 75 #if !defined(OS_CHROMEOS)
76 // Set an ImageWriterClient to use. Should be called only when testing. 76 // Set an ImageWriterClient to use. Should be called only when testing.
77 void SetUtilityClientForTesting( 77 static void SetUtilityClientForTesting(
78 scoped_refptr<ImageWriterUtilityClient> client); 78 scoped_refptr<ImageWriterUtilityClient> client);
79 #endif 79 #endif
80 80
81 protected: 81 protected:
82 virtual ~Operation(); 82 virtual ~Operation();
83 83
84 // This function should be overriden by subclasses to set up the work of the 84 // This function should be overriden by subclasses to set up the work of the
85 // operation. It will be called from Start(). 85 // operation. It will be called from Start().
86 virtual void StartImpl() = 0; 86 virtual void StartImpl() = 0;
87 87
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 // CleanUp operations that must be run. All these functions are run on the 212 // CleanUp operations that must be run. All these functions are run on the
213 // FILE thread. 213 // FILE thread.
214 std::vector<base::Closure> cleanup_functions_; 214 std::vector<base::Closure> cleanup_functions_;
215 }; 215 };
216 216
217 } // namespace image_writer 217 } // namespace image_writer
218 } // namespace extensions 218 } // namespace extensions
219 219
220 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_ 220 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698