Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / metrics / variations / generated_resources_map.h
blob83ab8eb9dcd2e1e35d125bca78588ef498c142a8
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_GENERATED_RESOURCES_MAP_H_
6 #define CHROME_BROWSER_METRICS_VARIATIONS_GENERATED_RESOURCES_MAP_H_
8 #include "base/basictypes.h"
10 namespace chrome_variations {
12 // This file provides a mapping from hashes of generated resource names to their
13 // IDs. This mapping is achieved by having two arrays: |kResourceHashes|, a
14 // sorted array of resource name hashes; and |kResourceIndices|, an array of
15 // resource indices in the same order as |kResourceHashes|. So, if
16 // generated_resources.h contains |#define IDS_FOO 12345|, then for some index i
17 // kResourceHashes[i] = HASH("IDS_FOO") and kResourceIndices[i] = 12345. Both
18 // arrays are of length |kNumResources|.
20 // The definitions of the arrays are generated by generate_resources_map.py from
21 // the content of generated_resources.h.
23 // Length of |kResourceHashes| and |kResourceIndices|.
24 extern const size_t kNumResources;
26 // A sorted array of hashed generated resource names.
27 extern const uint32_t kResourceHashes[];
29 // An array of generated resource indices. The order of this array corresponds
30 // to the order of |kResourceHashes|.
31 extern const int kResourceIndices[];
33 // Gets the resource index corresponding to the given hash.
34 int GetResourceIndex(uint32_t hash);
36 } // namespace chrome_variations
38 #endif // CHROME_BROWSER_METRICS_VARIATIONS_GENERATED_RESOURCES_MAP_H_