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

Side by Side Diff: runtime/vm/dev_fs.cc

Issue 2057283003: Fix bots (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "vm/dev_fs.h" 9 #include "vm/dev_fs.h"
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 void ListFiles(JSONStream* js) { 103 void ListFiles(JSONStream* js) {
104 JSONObject jsobj(js); 104 JSONObject jsobj(js);
105 jsobj.AddProperty("type", "FSFilesList"); 105 jsobj.AddProperty("type", "FSFilesList");
106 JSONArray jsarr(&jsobj, "files"); 106 JSONArray jsarr(&jsobj, "files");
107 std::map<std::string, std::vector<uint8_t>*>::iterator iter; 107 std::map<std::string, std::vector<uint8_t>*>::iterator iter;
108 for (iter = files_.begin(); iter != files_.end(); iter++) { 108 for (iter = files_.begin(); iter != files_.end(); iter++) {
109 JSONObject file_info(&jsarr); 109 JSONObject file_info(&jsarr);
110 file_info.AddProperty("name", iter->first.c_str()); 110 file_info.AddProperty("name", iter->first.c_str());
111 file_info.AddProperty("size", static_cast<int64_t>(iter->second->size())); 111 file_info.AddProperty64("size",
112 static_cast<int64_t>(iter->second->size()));
112 } 113 }
113 } 114 }
114 115
115 private: 116 private:
116 std::string name_; 117 std::string name_;
117 118
118 std::map<std::string, std::vector<uint8_t>*> files_; 119 std::map<std::string, std::vector<uint8_t>*> files_;
119 }; 120 };
120 121
121 // Some static state is held outside of the DevFS class so that we don't 122 // Some static state is held outside of the DevFS class so that we don't
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 362 }
362 363
363 JSONObject jsobj(js); 364 JSONObject jsobj(js);
364 jsobj.AddProperty("type", "FSFile"); 365 jsobj.AddProperty("type", "FSFile");
365 jsobj.AddPropertyBase64("fileContents", 366 jsobj.AddPropertyBase64("fileContents",
366 &((*file_contents)[0]), 367 &((*file_contents)[0]),
367 file_contents->size()); 368 file_contents->size());
368 } 369 }
369 370
370 } // namespace dart 371 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698