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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_aurax11.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 | « ui/app_list/search/tokenized_string_char_iterator_unittest.cc ('k') | ui/gfx/font_list_impl.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 (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 "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" 5 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 const std::vector<FileInfo>& filenames) { 192 const std::vector<FileInfo>& filenames) {
193 std::vector<std::string> paths; 193 std::vector<std::string> paths;
194 for (std::vector<FileInfo>::const_iterator it = filenames.begin(); 194 for (std::vector<FileInfo>::const_iterator it = filenames.begin();
195 it != filenames.end(); 195 it != filenames.end();
196 ++it) { 196 ++it) {
197 std::string url_spec = net::FilePathToFileURL(it->path).spec(); 197 std::string url_spec = net::FilePathToFileURL(it->path).spec();
198 if (!url_spec.empty()) 198 if (!url_spec.empty())
199 paths.push_back(url_spec); 199 paths.push_back(url_spec);
200 } 200 }
201 201
202 std::string joined_data = JoinString(paths, '\n'); 202 std::string joined_data = base::JoinString(paths, "\n");
203 scoped_refptr<base::RefCountedMemory> mem( 203 scoped_refptr<base::RefCountedMemory> mem(
204 base::RefCountedString::TakeString(&joined_data)); 204 base::RefCountedString::TakeString(&joined_data));
205 format_map_.Insert(atom_cache_.GetAtom(Clipboard::kMimeTypeURIList), mem); 205 format_map_.Insert(atom_cache_.GetAtom(Clipboard::kMimeTypeURIList), mem);
206 } 206 }
207 207
208 void OSExchangeDataProviderAuraX11::SetPickledData( 208 void OSExchangeDataProviderAuraX11::SetPickledData(
209 const OSExchangeData::CustomFormat& format, 209 const OSExchangeData::CustomFormat& format,
210 const base::Pickle& pickle) { 210 const base::Pickle& pickle) {
211 const unsigned char* data = 211 const unsigned char* data =
212 reinterpret_cast<const unsigned char*>(pickle.data()); 212 reinterpret_cast<const unsigned char*>(pickle.data());
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 /////////////////////////////////////////////////////////////////////////////// 547 ///////////////////////////////////////////////////////////////////////////////
548 // OSExchangeData, public: 548 // OSExchangeData, public:
549 549
550 // static 550 // static
551 OSExchangeData::Provider* OSExchangeData::CreateProvider() { 551 OSExchangeData::Provider* OSExchangeData::CreateProvider() {
552 return new OSExchangeDataProviderAuraX11(); 552 return new OSExchangeDataProviderAuraX11();
553 } 553 }
554 554
555 } // namespace ui 555 } // namespace ui
OLDNEW
« no previous file with comments | « ui/app_list/search/tokenized_string_char_iterator_unittest.cc ('k') | ui/gfx/font_list_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698