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

Side by Side Diff: device/bluetooth/bluetooth_uuid.cc

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #include "device/bluetooth/bluetooth_uuid.h" 5 #include "device/bluetooth/bluetooth_uuid.h"
6 6
7 #include "base/basictypes.h" 7 #include <stddef.h>
8
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
10 #include "ipc/ipc_message.h" 11 #include "ipc/ipc_message.h"
11 12
12 namespace device { 13 namespace device {
13 14
14 namespace { 15 namespace {
15 16
16 const char* kCommonUuidPostfix = "-0000-1000-8000-00805f9b34fb"; 17 const char* kCommonUuidPostfix = "-0000-1000-8000-00805f9b34fb";
17 const char* kCommonUuidPrefix = "0000"; 18 const char* kCommonUuidPrefix = "0000";
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // .canonical_value(). Then if browser-side code accidentally checks .value() 112 // .canonical_value(). Then if browser-side code accidentally checks .value()
112 // against a 128-bit string literal, a hostile renderer could use the 16- or 113 // against a 128-bit string literal, a hostile renderer could use the 16- or
113 // 32-bit format and evade the check. 114 // 32-bit format and evade the check.
114 return r->format() == device::BluetoothUUID::kFormat128Bit; 115 return r->format() == device::BluetoothUUID::kFormat128Bit;
115 } 116 }
116 117
117 void IPC::ParamTraits<device::BluetoothUUID>::Log(const param_type& p, 118 void IPC::ParamTraits<device::BluetoothUUID>::Log(const param_type& p,
118 std::string* l) { 119 std::string* l) {
119 l->append(p.canonical_value()); 120 l->append(p.canonical_value());
120 } 121 }
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_task_manager_win_unittest.cc ('k') | device/bluetooth/bluetooth_uuid_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698