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

Side by Side Diff: base/data_pack.h

Issue 18186: generate test_shell.pak and hook up loading net resources from (Closed)
Patch Set: Created 11 years, 11 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 | net/base/net_util.cc » ('j') | webkit/tools/test_shell/test_shell_mac.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 // DataPack represents a read-only view onto an on-disk file that contains 5 // DataPack represents a read-only view onto an on-disk file that contains
6 // (key, value) pairs of data. It's used to store static resources like 6 // (key, value) pairs of data. It's used to store static resources like
7 // translation strings and images. 7 // translation strings and images.
8 8
9 #ifndef BASE_DATA_PACK_H_ 9 #ifndef BASE_DATA_PACK_H_
10 #define BASE_DATA_PACK_H_ 10 #define BASE_DATA_PACK_H_
(...skipping 21 matching lines...) Expand all
32 // The data is owned by the DataPack object and should not be modified. 32 // The data is owned by the DataPack object and should not be modified.
33 // Returns false if the resource id isn't found. 33 // Returns false if the resource id isn't found.
34 bool Get(uint32_t resource_id, StringPiece* data); 34 bool Get(uint32_t resource_id, StringPiece* data);
35 35
36 private: 36 private:
37 // The memory-mapped data. 37 // The memory-mapped data.
38 scoped_ptr<file_util::MemoryMappedFile> mmap_; 38 scoped_ptr<file_util::MemoryMappedFile> mmap_;
39 39
40 // Number of resources in the data. 40 // Number of resources in the data.
41 size_t resource_count_; 41 size_t resource_count_;
42
43 DISALLOW_COPY_AND_ASSIGN(DataPack);
42 }; 44 };
43 45
44 } // namespace base 46 } // namespace base
45 47
46 #endif // BASE_DATA_PACK_H_ 48 #endif // BASE_DATA_PACK_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/net_util.cc » ('j') | webkit/tools/test_shell/test_shell_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698