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

Unified Diff: src/platform/update_engine/utils.h

Issue 492008: AU: Try delta updates first, then full updates (Closed)
Patch Set: use mkstemp Created 11 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/update_engine/update_metadata.proto ('k') | src/platform/update_engine/utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/utils.h
diff --git a/src/platform/update_engine/utils.h b/src/platform/update_engine/utils.h
index 7920f3c74916d04a9b8951c06e348c451f68b847..de998f414ba93410a70c4b8ffcfcd7bb56c3f971 100644
--- a/src/platform/update_engine/utils.h
+++ b/src/platform/update_engine/utils.h
@@ -38,7 +38,7 @@ bool FileExists(const char* path);
// of the string passed in.
// NEVER CALL THIS FUNCTION UNLESS YOU ARE SURE
// THAT YOUR PROCESS WILL BE THE ONLY THING WRITING FILES IN THIS DIRECTORY.
-std::string TempFilename(string path);
+std::string TempFilename(std::string path);
// Deletes a directory and all its contents synchronously. Returns true
// on success. This may be called with a regular file--it will just unlink it.
@@ -47,8 +47,8 @@ bool RecursiveUnlinkDir(const std::string& path);
// Synchronously mount or unmount a filesystem. Return true on success.
// Mounts as ext3 with default options.
-bool MountFilesystem(const string& device, const string& mountpoint);
-bool UnmountFilesystem(const string& mountpoint);
+bool MountFilesystem(const std::string& device, const std::string& mountpoint);
+bool UnmountFilesystem(const std::string& mountpoint);
// Log a string in hex to LOG(INFO). Useful for debugging.
void HexDumpArray(const unsigned char* const arr, const size_t length);
@@ -59,7 +59,7 @@ inline void HexDumpVector(const std::vector<char>& vect) {
HexDumpArray(reinterpret_cast<const unsigned char*>(&vect[0]), vect.size());
}
-extern const string kStatefulPartition;
+extern const char* const kStatefulPartition;
bool StringHasSuffix(const std::string& str, const std::string& suffix);
bool StringHasPrefix(const std::string& str, const std::string& prefix);
@@ -68,6 +68,10 @@ template<typename KeyType, typename ValueType>
bool MapContainsKey(const std::map<KeyType, ValueType>& m, const KeyType& k) {
return m.find(k) != m.end();
}
+template<typename KeyType>
+bool SetContainsKey(const std::set<KeyType>& s, const KeyType& k) {
+ return s.find(k) != s.end();
+}
template<typename ValueType>
std::set<ValueType> SetWithValue(const ValueType& value) {
« no previous file with comments | « src/platform/update_engine/update_metadata.proto ('k') | src/platform/update_engine/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698