Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__ | |
| 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__ | |
| 7 | |
| 8 #include <vector> | |
| 9 #include "base/basictypes.h" | |
| 10 #include "update_engine/graph_types.h" | |
| 11 #include "update_engine/update_metadata.pb.h" | |
| 12 | |
| 13 // A few utility functions for graphs | |
| 14 | |
| 15 namespace chromeos_update_engine { | |
| 16 | |
| 17 // Returns the number of blocks represented by all extents in the edge. | |
| 18 uint64 EdgeWeight(const Graph& graph, const Edge& edge); | |
|
Daniel Erat
2010/02/05 17:55:19
mind moving these into a graph_utils namespace? i
adlr
2010/02/22 23:27:31
Done.
| |
| 19 | |
| 20 // block must either be the next block in the last extent or a block | |
| 21 // in the next extent. This function will not handle inserting block | |
| 22 // into an arbitrary place in the extents | |
|
Daniel Erat
2010/02/05 17:55:19
nit: add trailing period
adlr
2010/02/22 23:27:31
Done.
| |
| 23 void AppendBlockToExtents(uint64 block, std::vector<Extent>* extents); | |
| 24 | |
| 25 } // namespace chromeos_update_engine | |
| 26 | |
| 27 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__ | |
| OLD | NEW |