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

Side by Side Diff: google_apis/gaia/oauth_request_signer.cc

Issue 12310041: experiment with -Wimplicit-fallthrough Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 6 years, 12 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
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 "google_apis/gaia/oauth_request_signer.h" 5 #include "google_apis/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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 DCHECK(request_base_url.is_valid()); 402 DCHECK(request_base_url.is_valid());
403 Parameters parameters(request_parameters); 403 Parameters parameters(request_parameters);
404 bool is_signed = SignParameters(request_base_url, signature_method, 404 bool is_signed = SignParameters(request_base_url, signature_method,
405 http_method, consumer_key, consumer_secret, 405 http_method, consumer_key, consumer_secret,
406 token_key, token_secret, &parameters); 406 token_key, token_secret, &parameters);
407 if (is_signed) { 407 if (is_signed) {
408 std::string signed_text; 408 std::string signed_text;
409 switch (http_method) { 409 switch (http_method) {
410 case GET_METHOD: 410 case GET_METHOD:
411 signed_text = request_base_url.spec() + '?'; 411 signed_text = request_base_url.spec() + '?';
412 // Intentionally falling through 412 FALLTHROUGH_INTENDED;
413 case POST_METHOD: 413 case POST_METHOD:
414 signed_text += BuildBaseStringParameters(parameters); 414 signed_text += BuildBaseStringParameters(parameters);
415 break; 415 break;
416 default: 416 default:
417 NOTREACHED(); 417 NOTREACHED();
418 } 418 }
419 *signed_text_return = signed_text; 419 *signed_text_return = signed_text;
420 } 420 }
421 return is_signed; 421 return is_signed;
422 } 422 }
(...skipping 27 matching lines...) Expand all
450 signed_text += 450 signed_text +=
451 base::StringPrintf( 451 base::StringPrintf(
452 "%s=\"%s\"", 452 "%s=\"%s\"",
453 OAuthRequestSigner::Encode(param->first).c_str(), 453 OAuthRequestSigner::Encode(param->first).c_str(),
454 OAuthRequestSigner::Encode(param->second).c_str()); 454 OAuthRequestSigner::Encode(param->second).c_str());
455 } 455 }
456 *signed_text_return = signed_text; 456 *signed_text_return = signed_text;
457 } 457 }
458 return is_signed; 458 return is_signed;
459 } 459 }
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_platform_context_3d.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698