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

Side by Side Diff: chrome/service/cloud_print/cloud_print_connector.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « chrome/renderer/web_apps.cc ('k') | chrome/test/base/chrome_process_util_mac.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 "chrome/service/cloud_print/cloud_print_connector.h" 5 #include "chrome/service/cloud_print/cloud_print_connector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/md5.h" 10 #include "base/md5.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 413 }
414 printer_data->GetString(kPrinterCapsHashValue, 414 printer_data->GetString(kPrinterCapsHashValue,
415 &printer_info_cloud.caps_hash); 415 &printer_info_cloud.caps_hash);
416 base::ListValue* tags_list = NULL; 416 base::ListValue* tags_list = NULL;
417 if (printer_data->GetList(kTagsValue, &tags_list) && tags_list) { 417 if (printer_data->GetList(kTagsValue, &tags_list) && tags_list) {
418 for (size_t index = 0; index < tags_list->GetSize(); index++) { 418 for (size_t index = 0; index < tags_list->GetSize(); index++) {
419 std::string tag; 419 std::string tag;
420 if (tags_list->GetString(index, &tag) && 420 if (tags_list->GetString(index, &tag) &&
421 base::StartsWith(tag, kCloudPrintServiceTagsHashTagName, 421 base::StartsWith(tag, kCloudPrintServiceTagsHashTagName,
422 base::CompareCase::INSENSITIVE_ASCII)) { 422 base::CompareCase::INSENSITIVE_ASCII)) {
423 std::vector<std::string> tag_parts; 423 std::vector<std::string> tag_parts = base::SplitString(
424 base::SplitStringDontTrim(tag, '=', &tag_parts); 424 tag, "=", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
425 DCHECK_EQ(tag_parts.size(), 2U); 425 DCHECK_EQ(tag_parts.size(), 2U);
426 if (tag_parts.size() == 2) 426 if (tag_parts.size() == 2)
427 printer_info_cloud.tags_hash = tag_parts[1]; 427 printer_info_cloud.tags_hash = tag_parts[1];
428 } 428 }
429 } 429 }
430 } 430 }
431 431
432 int xmpp_timeout = 0; 432 int xmpp_timeout = 0;
433 printer_data->GetInteger(kLocalSettingsPendingXmppValue, &xmpp_timeout); 433 printer_data->GetInteger(kLocalSettingsPendingXmppValue, &xmpp_timeout);
434 printer_info_cloud.current_xmpp_timeout = settings_.xmpp_ping_timeout_sec(); 434 printer_info_cloud.current_xmpp_timeout = settings_.xmpp_ping_timeout_sec();
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 kCloudPrintAPIMaxRetryCount, mime_type, post_data, 650 kCloudPrintAPIMaxRetryCount, mime_type, post_data,
651 &CloudPrintConnector::HandleRegisterPrinterResponse); 651 &CloudPrintConnector::HandleRegisterPrinterResponse);
652 } 652 }
653 653
654 bool CloudPrintConnector::IsSamePrinter(const std::string& name1, 654 bool CloudPrintConnector::IsSamePrinter(const std::string& name1,
655 const std::string& name2) const { 655 const std::string& name2) const {
656 return base::EqualsCaseInsensitiveASCII(name1, name2); 656 return base::EqualsCaseInsensitiveASCII(name1, name2);
657 } 657 }
658 658
659 } // namespace cloud_print 659 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/renderer/web_apps.cc ('k') | chrome/test/base/chrome_process_util_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698