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

Side by Side Diff: src/platform/update_engine/graph_utils.h

Issue 1718001: AU: Class to perform delta updates. (Closed)
Patch Set: fixes for review Created 10 years, 8 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__
7 7
8 #include <vector> 8 #include <vector>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "update_engine/graph_types.h" 10 #include "update_engine/graph_types.h"
11 #include "update_engine/update_metadata.pb.h" 11 #include "update_engine/update_metadata.pb.h"
12 12
13 // A few utility functions for graphs 13 // A few utility functions for graphs
14 14
15 namespace chromeos_update_engine { 15 namespace chromeos_update_engine {
16 16
17 namespace graph_utils { 17 namespace graph_utils {
18 18
19 // Returns the number of blocks represented by all extents in the edge. 19 // Returns the number of blocks represented by all extents in the edge.
20 uint64 EdgeWeight(const Graph& graph, const Edge& edge); 20 uint64_t EdgeWeight(const Graph& graph, const Edge& edge);
21 21
22 // block must either be the next block in the last extent or a block 22 // block must either be the next block in the last extent or a block
23 // in the next extent. This function will not handle inserting block 23 // in the next extent. This function will not handle inserting block
24 // into an arbitrary place in the extents. 24 // into an arbitrary place in the extents.
25 void AppendBlockToExtents(std::vector<Extent>* extents, uint64 block); 25 void AppendBlockToExtents(std::vector<Extent>* extents, uint64_t block);
26 26
27 } // namespace graph_utils 27 } // namespace graph_utils
28 28
29 } // namespace chromeos_update_engine 29 } // namespace chromeos_update_engine
30 30
31 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__ 31 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_GRAPH_UTILS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698