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

Side by Side Diff: chrome/browser/ui/webui/feedback_ui.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
« no previous file with comments | « chrome/browser/ui/webui/favicon_source.cc ('k') | chrome/browser/ui/webui/inspect_ui.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/browser/ui/webui/feedback_ui.h" 5 #include "chrome/browser/ui/webui/feedback_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 int index = -1; 402 int index = -1;
403 403
404 std::vector<std::string> params; 404 std::vector<std::string> params;
405 std::string custom_page_url; 405 std::string custom_page_url;
406 if (Tokenize(query, std::string("&"), &params)) { 406 if (Tokenize(query, std::string("&"), &params)) {
407 for (std::vector<std::string>::iterator it = params.begin(); 407 for (std::vector<std::string>::iterator it = params.begin();
408 it != params.end(); ++it) { 408 it != params.end(); ++it) {
409 std::string query_str = *it; 409 std::string query_str = *it;
410 if (StartsWithASCII(query_str, std::string(kSessionIDParameter), true)) { 410 if (StartsWithASCII(query_str, std::string(kSessionIDParameter), true)) {
411 ReplaceFirstSubstringAfterOffset( 411 ReplaceFirstSubstringAfterOffset(
412 &query_str, 0, kSessionIDParameter, ""); 412 &query_str, 0, kSessionIDParameter, std::string());
413 if (!base::StringToInt(query_str, &session_id)) 413 if (!base::StringToInt(query_str, &session_id))
414 return false; 414 return false;
415 } else if (StartsWithASCII(*it, std::string(kTabIndexParameter), true)) { 415 } else if (StartsWithASCII(*it, std::string(kTabIndexParameter), true)) {
416 ReplaceFirstSubstringAfterOffset( 416 ReplaceFirstSubstringAfterOffset(
417 &query_str, 0, kTabIndexParameter, ""); 417 &query_str, 0, kTabIndexParameter, std::string());
418 if (!base::StringToInt(query_str, &index)) 418 if (!base::StringToInt(query_str, &index))
419 return false; 419 return false;
420 } else if (StartsWithASCII(*it, std::string(kCustomPageUrlParameter), 420 } else if (StartsWithASCII(*it, std::string(kCustomPageUrlParameter),
421 true)) { 421 true)) {
422 ReplaceFirstSubstringAfterOffset( 422 ReplaceFirstSubstringAfterOffset(
423 &query_str, 0, kCustomPageUrlParameter, ""); 423 &query_str, 0, kCustomPageUrlParameter, std::string());
424 custom_page_url = query_str; 424 custom_page_url = query_str;
425 } else if (StartsWithASCII(*it, std::string(kCategoryTagParameter), 425 } else if (StartsWithASCII(*it, std::string(kCategoryTagParameter),
426 true)) { 426 true)) {
427 ReplaceFirstSubstringAfterOffset( 427 ReplaceFirstSubstringAfterOffset(
428 &query_str, 0, kCategoryTagParameter, ""); 428 &query_str, 0, kCategoryTagParameter, std::string());
429 category_tag_ = query_str; 429 category_tag_ = query_str;
430 #if defined(OS_CHROMEOS) 430 #if defined(OS_CHROMEOS)
431 } else if (StartsWithASCII(*it, std::string(kTimestampParameter), true)) { 431 } else if (StartsWithASCII(*it, std::string(kTimestampParameter), true)) {
432 ReplaceFirstSubstringAfterOffset( 432 ReplaceFirstSubstringAfterOffset(
433 &query_str, 0, kTimestampParameter, ""); 433 &query_str, 0, kTimestampParameter, "");
434 timestamp_ = query_str; 434 timestamp_ = query_str;
435 #endif 435 #endif
436 } 436 }
437 } 437 }
438 } 438 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 screenshot_filepaths.begin() + sort_size, 720 screenshot_filepaths.begin() + sort_size,
721 screenshot_filepaths.end(), 721 screenshot_filepaths.end(),
722 ScreenshotTimestampComp); 722 ScreenshotTimestampComp);
723 for (size_t i = 0; i < sort_size; ++i) 723 for (size_t i = 0; i < sort_size; ++i)
724 saved_screenshots->push_back( 724 saved_screenshots->push_back(
725 std::string(ScreenshotSource::kScreenshotUrlRoot) + 725 std::string(ScreenshotSource::kScreenshotUrlRoot) +
726 std::string(ScreenshotSource::kScreenshotSaved) + 726 std::string(ScreenshotSource::kScreenshotSaved) +
727 screenshot_filepaths[i]); 727 screenshot_filepaths[i]);
728 } 728 }
729 #endif 729 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/favicon_source.cc ('k') | chrome/browser/ui/webui/inspect_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698