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

Side by Side Diff: chrome/common/extensions/permissions/bluetooth_device_permission_data.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/extensions/permissions/bluetooth_device_permission_data. h" 5 #include "chrome/common/extensions/permissions/bluetooth_device_permission_data. h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/common/extensions/permissions/bluetooth_device_permission.h" 11 #include "chrome/common/extensions/permissions/bluetooth_device_permission.h"
12 12
13 namespace { 13 namespace {
14 14
15 const char* kDeviceAddressKey = "deviceAddress"; 15 const char* kDeviceAddressKey = "deviceAddress";
16 16
17 } // namespace 17 } // namespace
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 BluetoothDevicePermissionData::BluetoothDevicePermissionData() 21 BluetoothDevicePermissionData::BluetoothDevicePermissionData() {}
22 : device_address_("") {
23 }
24 22
25 BluetoothDevicePermissionData::BluetoothDevicePermissionData( 23 BluetoothDevicePermissionData::BluetoothDevicePermissionData(
26 const std::string& device_address) : device_address_(device_address) { 24 const std::string& device_address) : device_address_(device_address) {
27 } 25 }
28 26
29 bool BluetoothDevicePermissionData::Check( 27 bool BluetoothDevicePermissionData::Check(
30 const APIPermission::CheckParam* param) const { 28 const APIPermission::CheckParam* param) const {
31 if (!param) 29 if (!param)
32 return false; 30 return false;
33 const BluetoothDevicePermission::CheckParam& specific_param = 31 const BluetoothDevicePermission::CheckParam& specific_param =
(...skipping 27 matching lines...) Expand all
61 const BluetoothDevicePermissionData& rhs) const { 59 const BluetoothDevicePermissionData& rhs) const {
62 return device_address_ < rhs.device_address_; 60 return device_address_ < rhs.device_address_;
63 } 61 }
64 62
65 bool BluetoothDevicePermissionData::operator==( 63 bool BluetoothDevicePermissionData::operator==(
66 const BluetoothDevicePermissionData& rhs) const { 64 const BluetoothDevicePermissionData& rhs) const {
67 return device_address_ == rhs.device_address_; 65 return device_address_ == rhs.device_address_;
68 } 66 }
69 67
70 } // namespace extensions 68 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/message_bundle.cc ('k') | chrome/common/extensions/permissions/socket_permission_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698