Searched refs:contents (Results 1 - 25 of 37) sorted by relevance

12

/system/tools/aidl/tests/
H A Dfake_io_delegate.cpp46 unique_ptr<string> contents; local
49 return contents;
51 contents.reset(new string);
52 *contents = it->second;
53 contents->append(content_suffix);
55 return contents;
94 const string& contents) {
95 file_contents_[filename] = contents;
102 string contents; local
104 contents
93 SetFileContents(const string& filename, const string& contents) argument
117 string contents = StringPrintf("package %s;\\ninterface %s { }", local
126 string contents = StringPrintf("package %s;\\n", package.c_str()); local
[all...]
H A Dfake_io_delegate.h55 const std::string& contents);
63 // When we return true, we'll set *contents to the written string.
/system/extras/perfprofd/quipper/
H A Dperf_utils.h39 bool FileToBuffer(const string& filename, std::vector<char>* contents);
42 bool BufferToFile(const string& filename, const CharContainer& contents) { argument
46 // Do not write anything if |contents| contains nothing. fopen will create
48 if (!contents.empty()) {
49 CHECK_EQ(fwrite(contents.data(),
51 contents.size(),
53 contents.size());
95 // Reads the contents of a file into |data|. Returns true on success, false if
99 // Writes contents of |data| to a file with name |filename|, overwriting any
/system/tools/aidl/
H A Dline_reader.cpp59 MemoryLineReader(const string& contents) : input_stream_(contents) {} argument
86 unique_ptr<LineReader> LineReader::ReadFromMemory(const string& contents) { argument
87 return unique_ptr<LineReader>(new MemoryLineReader(contents));
H A Dline_reader.h37 const std::string& contents);
H A Dio_delegate.cpp86 unique_ptr<string> contents; local
89 return contents;
91 contents.reset(new string);
94 contents->resize(file_size + content_suffix.length());
96 // Read the file contents into the beginning of the string
97 in.read(&(*contents)[0], file_size);
99 contents->replace(file_size, content_suffix.length(), content_suffix);
102 return contents;
H A Daidl_unittest.cpp68 const string& contents,
70 io_delegate_.SetFileContents(path, contents);
100 string contents = "package foo;\n" local
103 EXPECT_EQ(nullptr, Parse(path, contents, &java_types_));
104 EXPECT_EQ(nullptr, Parse(path, contents, &cpp_types_));
67 Parse(const string& path, const string& contents, TypeNamespace* types) argument
/system/connectivity/shill/
H A Dresolver.cc101 string contents = base::JoinString(lines, "\n"); local
104 int count = base::WriteFile(path_, contents.c_str(), contents.size());
106 return count == static_cast<int>(contents.size());
/system/update_engine/common/
H A Daction_pipe.h61 const ObjectType& contents() const { return contents_; } function in class:chromeos_update_engine::ActionPipe
65 void set_contents(const ObjectType& contents) { contents_ = contents; } argument
H A Daction_pipe_unittest.cc57 EXPECT_EQ("foo", b.in_pipe()->contents());
H A Daction.h191 return in_pipe_->contents();
211 return out_pipe_->contents();
/system/update_engine/
H A Dhardware_chromeos.cc134 string contents; local
135 if (!utils::ReadFile(marker_path.value(), &contents))
137 base::TrimWhitespaceASCII(contents, base::TRIM_TRAILING, &contents);
138 if (!base::StringToInt(contents, &powerwash_count))
/system/core/crash_reporter/
H A Dcrash_collector_test.cc185 std::string contents; local
190 EXPECT_TRUE(base::ReadFileToString(meta_file, &contents));
198 EXPECT_EQ(kExpectedMeta, contents);
212 // Target metadata contents should have stayed the same.
213 contents.clear();
214 EXPECT_TRUE(base::ReadFileToString(meta_file, &contents));
215 EXPECT_EQ(kExpectedMeta, contents);
245 std::string contents; local
246 EXPECT_TRUE(base::ReadFileToString(output_file, &contents));
247 EXPECT_EQ("hello world\n", contents);
[all...]
H A Dkernel_collector.h79 bool LoadPreservedDump(std::string *contents);
93 bool ReadRecordToString(std::string *contents,
H A Dkernel_collector.cc91 bool KernelCollector::ReadRecordToString(std::string *contents, argument
116 contents->append(captured);
125 contents->append(record);
165 bool KernelCollector::LoadPreservedDump(std::string *contents) { argument
166 // Load dumps from the preserved memory and save them in contents.
172 // clear contents since ReadFileToString actually appends to the string.
173 contents->clear();
176 if (!ReadRecordToString(contents, i, &record_found)) {
H A Dkernel_collector_test.cc289 std::string contents; local
290 ASSERT_TRUE(base::ReadFileToString(FilePath(filename), &contents));
291 ASSERT_EQ("something", contents);
/system/core/libutils/
H A DTokenizer.cpp104 const char* contents, Tokenizer** outTokenizer) {
106 const_cast<char*>(contents), false, strlen(contents));
103 fromContents(const String8& filename, const char* contents, Tokenizer** outTokenizer) argument
/system/core/include/utils/
H A DTokenizer.h46 * Prepares to tokenize the contents of a string.
52 const char* contents, Tokenizer** outTokenizer);
/system/core/libmemunreachable/include/memunreachable/
H A Dmemunreachable.h42 char contents[contents_length]; member in struct:Leak
/system/connectivity/shill/vpn/
H A Dopenvpn_driver.cc303 string contents = JoinOptions(options, '\n'); local
304 contents.push_back('\n');
306 base::WriteFile(*config_file, contents.data(), contents.size()) !=
307 static_cast<int>(contents.size())) {
647 string contents = local
649 if (!contents.empty()) {
651 base::WriteFile(tls_auth_file_, contents.data(), contents.size()) !=
652 static_cast<int>(contents
1023 string contents; local
[all...]
/system/netd/server/
H A DRouteController.cpp150 void addTableName(uint32_t table, const std::string& name, std::string* contents) { argument
153 *contents += tableString;
154 *contents += " ";
155 *contents += name;
156 *contents += "\n";
161 std::string contents; local
163 addTableName(RT_TABLE_LOCAL, ROUTE_TABLE_NAME_LOCAL, &contents);
164 addTableName(RT_TABLE_MAIN, ROUTE_TABLE_NAME_MAIN, &contents);
166 addTableName(ROUTE_TABLE_LOCAL_NETWORK, ROUTE_TABLE_NAME_LOCAL_NETWORK, &contents);
167 addTableName(ROUTE_TABLE_LEGACY_NETWORK, ROUTE_TABLE_NAME_LEGACY_NETWORK, &contents);
[all...]
/system/extras/perfprofd/
H A Dconfigreader.cc251 std::string contents; local
252 if (! android::base::ReadFileToString(config_file_path, &contents)) {
256 std::stringstream ss(contents);
H A Dperfprofdcore.cc359 std::string contents; local
361 if (android::base::ReadFileToString(online_path.c_str(), &contents) &&
362 sscanf(contents.c_str(), "%d", &value) == 1) {
394 std::string contents; local
398 if (!android::base::ReadFileToString("/proc/stat", &contents)) {
401 if (!postprocess_proc_stat_contents(contents, &idle[iter], &busy[iter])) {
452 // Examine the contents of wake_unlock to determine whether the
/system/connectivity/apmanager/
H A Ddevice_info.cc196 string contents; local
197 if (!GetDeviceInfoContents(iface_name, kInterfaceUevent, &contents)) {
202 if (contents.find(kInterfaceUeventWifiSignature) == string::npos) {
/system/extras/simpleperf/
H A Dread_elf.cpp108 auto contents = elf->getSectionContents(&*section_iterator); local
109 if (contents.getError()) {
113 if (GetBuildIdFromNoteSection(reinterpret_cast<const char*>(contents->data()),
114 contents->size(), build_id)) {

Completed in 1198 milliseconds

12