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

Side by Side Diff: extensions/browser/api/bluetooth_low_energy/utils.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 "extensions/browser/api/bluetooth_low_energy/utils.h" 5 #include "extensions/browser/api/bluetooth_low_energy/utils.h"
6 6
7 namespace extensions { 7 namespace extensions {
8 namespace core_api { 8 namespace api {
9 namespace bluetooth_low_energy { 9 namespace bluetooth_low_energy {
10 10
11 namespace { 11 namespace {
12 12
13 // Converts a list of CharacteristicProperty to a base::ListValue of strings. 13 // Converts a list of CharacteristicProperty to a base::ListValue of strings.
14 scoped_ptr<base::ListValue> CharacteristicPropertiesToValue( 14 scoped_ptr<base::ListValue> CharacteristicPropertiesToValue(
15 const std::vector<CharacteristicProperty> properties) { 15 const std::vector<CharacteristicProperty> properties) {
16 scoped_ptr<base::ListValue> property_list(new base::ListValue()); 16 scoped_ptr<base::ListValue> property_list(new base::ListValue());
17 for (std::vector<CharacteristicProperty>::const_iterator iter = 17 for (std::vector<CharacteristicProperty>::const_iterator iter =
18 properties.begin(); 18 properties.begin();
(...skipping 26 matching lines...) Expand all
45 45
46 base::DictionaryValue* chrc_value = NULL; 46 base::DictionaryValue* chrc_value = NULL;
47 to->GetDictionaryWithoutPathExpansion("characteristic", &chrc_value); 47 to->GetDictionaryWithoutPathExpansion("characteristic", &chrc_value);
48 DCHECK(chrc_value); 48 DCHECK(chrc_value);
49 chrc_value->SetWithoutPathExpansion( 49 chrc_value->SetWithoutPathExpansion(
50 "properties", CharacteristicPropertiesToValue(properties).release()); 50 "properties", CharacteristicPropertiesToValue(properties).release());
51 return to.Pass(); 51 return to.Pass();
52 } 52 }
53 53
54 } // namespace bluetooth_low_energy 54 } // namespace bluetooth_low_energy
55 } // namespace core_api 55 } // namespace api
56 } // namespace extensions 56 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/bluetooth_low_energy/utils.h ('k') | extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698