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

Side by Side Diff: chrome/utility/safe_browsing/mac/convert_big_endian.h

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « chrome/utility/profile_import_handler.cc ('k') | chrome/utility/safe_browsing/mac/crdmg.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_UTILITY_SAFE_BROWSING_MAC_CONVERT_BIG_ENDIAN_H_ 5 #ifndef CHROME_UTILITY_SAFE_BROWSING_MAC_CONVERT_BIG_ENDIAN_H_
6 #define CHROME_UTILITY_SAFE_BROWSING_MAC_CONVERT_BIG_ENDIAN_H_ 6 #define CHROME_UTILITY_SAFE_BROWSING_MAC_CONVERT_BIG_ENDIAN_H_
7 7
8 #include <libkern/OSByteOrder.h> 8 #include <libkern/OSByteOrder.h>
9 #include <stdint.h>
9 #include <sys/types.h> 10 #include <sys/types.h>
10 11
11 // This file contains byte swapping routines for use in safe_browsing::dmg. The 12 // This file contains byte swapping routines for use in safe_browsing::dmg. The
12 // pattern is to use type-based overloading of the form ConvertBigEndian(T*) to 13 // pattern is to use type-based overloading of the form ConvertBigEndian(T*) to
13 // swap all structures from big-endian to host-endian. This file provides the 14 // swap all structures from big-endian to host-endian. This file provides the
14 // implementations for scalars, which are inlined since the OSSwap functions 15 // implementations for scalars, which are inlined since the OSSwap functions
15 // themselves are macros that call compiler intrinsics. 16 // themselves are macros that call compiler intrinsics.
16 17
17 namespace safe_browsing { 18 namespace safe_browsing {
18 namespace dmg { 19 namespace dmg {
(...skipping 11 matching lines...) Expand all
30 } 31 }
31 32
32 inline void ConvertBigEndian(uint64_t* x) { 33 inline void ConvertBigEndian(uint64_t* x) {
33 *x = OSSwapBigToHostInt64(*x); 34 *x = OSSwapBigToHostInt64(*x);
34 } 35 }
35 36
36 } // namespace dmg 37 } // namespace dmg
37 } // namespace safe_browsing 38 } // namespace safe_browsing
38 39
39 #endif // CHROME_UTILITY_SAFE_BROWSING_MAC_CONVERT_BIG_ENDIAN_H_ 40 #endif // CHROME_UTILITY_SAFE_BROWSING_MAC_CONVERT_BIG_ENDIAN_H_
OLDNEW
« no previous file with comments | « chrome/utility/profile_import_handler.cc ('k') | chrome/utility/safe_browsing/mac/crdmg.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698