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

Side by Side Diff: chrome/common/net/gaia/oauth_request_signer.cc

Issue 9705024: [Coverity] Fix pass-by-val to pass-by-ref (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/net/gaia/oauth_request_signer.h" 5 #include "chrome/common/net/gaia/oauth_request_signer.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 #include <cstddef> 8 #include <cstddef>
9 #include <cstdlib> 9 #include <cstdlib>
10 #include <cstring> 10 #include <cstring>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return "RSA-SHA1"; 71 return "RSA-SHA1";
72 case OAuthRequestSigner::PLAINTEXT_SIGNATURE: 72 case OAuthRequestSigner::PLAINTEXT_SIGNATURE:
73 return "PLAINTEXT"; 73 return "PLAINTEXT";
74 } 74 }
75 NOTREACHED(); 75 NOTREACHED();
76 return *(new std::string()); 76 return *(new std::string());
77 } 77 }
78 78
79 std::string BuildBaseString(const GURL& request_base_url, 79 std::string BuildBaseString(const GURL& request_base_url,
80 OAuthRequestSigner::HttpMethod http_method, 80 OAuthRequestSigner::HttpMethod http_method,
81 const std::string base_parameters) { 81 const std::string& base_parameters) {
82 return StringPrintf("%s&%s&%s", 82 return StringPrintf("%s&%s&%s",
83 HttpMethodName(http_method).c_str(), 83 HttpMethodName(http_method).c_str(),
84 OAuthRequestSigner::Encode( 84 OAuthRequestSigner::Encode(
85 request_base_url.spec()).c_str(), 85 request_base_url.spec()).c_str(),
86 OAuthRequestSigner::Encode( 86 OAuthRequestSigner::Encode(
87 base_parameters).c_str()); 87 base_parameters).c_str());
88 } 88 }
89 89
90 std::string BuildBaseStringParameters( 90 std::string BuildBaseStringParameters(
91 const OAuthRequestSigner::Parameters& parameters) { 91 const OAuthRequestSigner::Parameters& parameters) {
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 signed_text += ", "; 449 signed_text += ", ";
450 signed_text += 450 signed_text +=
451 StringPrintf("%s=\"%s\"", 451 StringPrintf("%s=\"%s\"",
452 OAuthRequestSigner::Encode(param->first).c_str(), 452 OAuthRequestSigner::Encode(param->first).c_str(),
453 OAuthRequestSigner::Encode(param->second).c_str()); 453 OAuthRequestSigner::Encode(param->second).c_str());
454 } 454 }
455 *signed_text_return = signed_text; 455 *signed_text_return = signed_text;
456 } 456 }
457 return is_signed; 457 return is_signed;
458 } 458 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698