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

Side by Side Diff: util/misc/uuid.h

Issue 913273002: win: Implementation of CrashReportDatabase for Windows (for C++ Windows readability review) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: better unlink checks Created 5 years, 10 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 | « client/crash_report_database_win.cc ('k') | util/misc/uuid.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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #ifndef CRASHPAD_UTIL_MISC_UUID_H_ 15 #ifndef CRASHPAD_UTIL_MISC_UUID_H_
16 #define CRASHPAD_UTIL_MISC_UUID_H_ 16 #define CRASHPAD_UTIL_MISC_UUID_H_
17 17
18 #include <stdint.h> 18 #include <stdint.h>
19 19
20 #include <string> 20 #include <string>
21 21
22 #include "base/strings/string16.h"
22 #include "base/strings/string_piece.h" 23 #include "base/strings/string_piece.h"
23 #include "build/build_config.h" 24 #include "build/build_config.h"
24 25
25 namespace crashpad { 26 namespace crashpad {
26 27
27 //! \brief A universally unique identifier (%UUID). 28 //! \brief A universally unique identifier (%UUID).
28 //! 29 //!
29 //! An alternate term for %UUID is “globally unique identifier” (GUID), used 30 //! An alternate term for %UUID is “globally unique identifier” (GUID), used
30 //! primarily by Microsoft. 31 //! primarily by Microsoft.
31 //! 32 //!
(...skipping 29 matching lines...) Expand all
61 //! been initialized with the data. `false` if the string could not be 62 //! been initialized with the data. `false` if the string could not be
62 //! parsed, with the object state untouched. 63 //! parsed, with the object state untouched.
63 bool InitializeFromString(const base::StringPiece& string); 64 bool InitializeFromString(const base::StringPiece& string);
64 65
65 //! \brief Formats the %UUID per RFC 4122 §3. 66 //! \brief Formats the %UUID per RFC 4122 §3.
66 //! 67 //!
67 //! \return A string of the form `"00112233-4455-6677-8899-aabbccddeeff"`. 68 //! \return A string of the form `"00112233-4455-6677-8899-aabbccddeeff"`.
68 std::string ToString() const; 69 std::string ToString() const;
69 70
70 #if defined(OS_WIN) 71 #if defined(OS_WIN)
71 //! \brief The same as ToString, but returned as a wstring. 72 //! \brief The same as ToString, but returned as a string16.
72 std::wstring ToWideString() const; 73 base::string16 ToString16() const;
73 #endif // OS_WIN 74 #endif // OS_WIN
74 75
75 // These fields are laid out according to RFC 4122 §4.1.2. 76 // These fields are laid out according to RFC 4122 §4.1.2.
76 uint32_t data_1; 77 uint32_t data_1;
77 uint16_t data_2; 78 uint16_t data_2;
78 uint16_t data_3; 79 uint16_t data_3;
79 uint8_t data_4[2]; 80 uint8_t data_4[2];
80 uint8_t data_5[6]; 81 uint8_t data_5[6];
81 }; 82 };
82 83
83 } // namespace crashpad 84 } // namespace crashpad
84 85
85 #endif // CRASHPAD_UTIL_MISC_UUID_H_ 86 #endif // CRASHPAD_UTIL_MISC_UUID_H_
OLDNEW
« no previous file with comments | « client/crash_report_database_win.cc ('k') | util/misc/uuid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698