summaryrefslogtreecommitdiff
path: root/bugreport.h
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2016-07-26 12:23:40 -0700
committerJosh Gao <jmgao@google.com>2016-08-30 13:06:28 -0700
commit23c7b87bbfae714a817577df97d771b9660e2f25 (patch)
tree2a44c4e4dd6119a9d58eaa260c554d2aad0f2164 /bugreport.h
parente167fe04ebced5ffacd2731c2073acf29f08329d (diff)
downloadadb-23c7b87bbfae714a817577df97d771b9660e2f25.tar.gz
DO NOT MERGE: Show bugreport progress.
adb calls bugreportz to generate a bugreport; initially, bugreportz would only report the final status of the operation (OK or FAIL), but now it sends intermediate PROGRESS lines reporting its progress (in the form of current/max). Similarly, the initial implementation of 'adb bugreport <zip_file>' would print an initial 'please wait' message and wait for the full stdout before parsing the result, but now it uses a new callback class to handle the stdout as it is generated by bugreportz. BUG: 28609499 Change-Id: I6644fc39a686279e1635f946a47f3847b547d1c1 (cherry picked from commit cd42d658b2d08ace81b5ae3b108acbaca1a1d439) (cherry picked from commit 97b73a0daf74081a6324bb41cc34d9f0598cfe29)
Diffstat (limited to 'bugreport.h')
-rw-r--r--bugreport.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/bugreport.h b/bugreport.h
index 1c39a9f..fd11a4a 100644
--- a/bugreport.h
+++ b/bugreport.h
@@ -21,12 +21,13 @@
#include "adb.h"
#include "commandline.h"
+#include "line_printer.h"
class Bugreport {
friend class BugreportStandardStreamsCallback;
public:
- Bugreport() {
+ Bugreport() : line_printer_() {
}
int DoIt(TransportType transport_type, const char* serial, int argc, const char** argv);
@@ -42,6 +43,9 @@ class Bugreport {
const char* name);
private:
+ virtual void UpdateProgress(const std::string& file_name, int progress, int total,
+ bool keep_info_line = false);
+ LinePrinter line_printer_;
DISALLOW_COPY_AND_ASSIGN(Bugreport);
};