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

Side by Side Diff: extensions/browser/api/bluetooth/bluetooth_private_api.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows 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
« no previous file with comments | « content/child/websocket_bridge.cc ('k') | extensions/browser/api/management/management_api.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 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/bluetooth_private_api.h" 5 #include "extensions/browser/api/bluetooth/bluetooth_private_api.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "device/bluetooth/bluetooth_adapter.h" 10 #include "device/bluetooth/bluetooth_adapter.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void BluetoothPrivateSetAdapterStateFunction::SendError() { 220 void BluetoothPrivateSetAdapterStateFunction::SendError() {
221 DCHECK(pending_properties_.empty()); 221 DCHECK(pending_properties_.empty());
222 DCHECK(!failed_properties_.empty()); 222 DCHECK(!failed_properties_.empty());
223 223
224 std::vector<std::string> failed_vector; 224 std::vector<std::string> failed_vector;
225 std::copy(failed_properties_.begin(), 225 std::copy(failed_properties_.begin(),
226 failed_properties_.end(), 226 failed_properties_.end(),
227 std::back_inserter(failed_vector)); 227 std::back_inserter(failed_vector));
228 228
229 std::vector<std::string> replacements(1); 229 std::vector<std::string> replacements(1);
230 replacements[0] = JoinString(failed_vector, ", "); 230 replacements[0] = base::JoinString(failed_vector, ", ");
231 std::string error = 231 std::string error =
232 ReplaceStringPlaceholders(kSetAdapterPropertyError, replacements, NULL); 232 ReplaceStringPlaceholders(kSetAdapterPropertyError, replacements, NULL);
233 SetError(error); 233 SetError(error);
234 SendResponse(false); 234 SendResponse(false);
235 } 235 }
236 236
237 BluetoothPrivateSetPairingResponseFunction:: 237 BluetoothPrivateSetPairingResponseFunction::
238 BluetoothPrivateSetPairingResponseFunction() {} 238 BluetoothPrivateSetPairingResponseFunction() {}
239 239
240 BluetoothPrivateSetPairingResponseFunction:: 240 BluetoothPrivateSetPairingResponseFunction::
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 this), 411 this),
412 base::Bind( 412 base::Bind(
413 &BluetoothPrivateSetDiscoveryFilterFunction::OnErrorCallback, 413 &BluetoothPrivateSetDiscoveryFilterFunction::OnErrorCallback,
414 this)); 414 this));
415 return true; 415 return true;
416 } 416 }
417 417
418 } // namespace core_api 418 } // namespace core_api
419 419
420 } // namespace extensions 420 } // namespace extensions
OLDNEW
« no previous file with comments | « content/child/websocket_bridge.cc ('k') | extensions/browser/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698