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

Issue 86913002: Make base::Base64Encode() return void (Closed)

Created:
7 years ago by Adam Rice
Modified:
7 years ago
Reviewers:
brettw
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

The comment in base64.h implies that base::Base64Encode() can return false, but this cannot happen in practice. Fix the comment. The implementation of Base64Encode() attempts to check for the return value MODP_B64_ERROR as a failure, but modp_b64_encode() cannot return this value. Remove the check. Remove unneeded integer cast. Change the return type to void. BUG=323357 TEST=base_unittests, compile all TBR=jochen@chromium.org,miket@chromium.org,joi@chromium.org,akalin@chromium.org,sergeyu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239759

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebase. #

Patch Set 3 : Break ALL the things! #

Patch Set 4 : Fix compile errors on Linux. #

Patch Set 5 : Fix compile errors on Windows. #

Patch Set 6 : Rebase. #

Total comments: 1

Patch Set 7 : Fix style nit. #

Patch Set 8 : Rebase. #

Patch Set 9 : Fix compile for chromeos #

Patch Set 10 : One more chromeos-specific fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -252 lines) Patch
M base/base64.h View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M base/base64.cc View 1 2 1 chunk +2 lines, -8 lines 0 comments Download
M base/base64_unittest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_html_writer.cc View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_cache.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/devtools/adb/android_rsa.cc View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/developer_private/developer_private_api.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -10 lines 0 comments Download
M chrome/browser/extensions/api/extension_action/extension_action_api.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/identity/web_auth_flow.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/networking_private/networking_private_service_client.cc View 1 2 3 4 5 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/extensions/api/proxy/proxy_api_helpers.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/extension_protocols.cc View 1 2 3 4 1 chunk +8 lines, -9 lines 0 comments Download
M chrome/browser/extensions/install_signer.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/internal_auth.cc View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/managed_mode/managed_user_registration_utility.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/media/desktop_streams_registry.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/metrics/metrics_log.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/metrics/metrics_log_serializer.cc View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/metrics/variations/variations_http_header_provider.cc View 1 2 3 4 1 chunk +6 lines, -10 lines 0 comments Download
M chrome/browser/metrics/variations/variations_service.cc View 1 2 3 1 chunk +1 line, -5 lines 0 comments Download
M chrome/browser/metrics/variations/variations_service_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 1 2 3 1 chunk +2 lines, -7 lines 0 comments Download
M chrome/browser/ui/ash/screenshot_taker.cc View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/certificate_dialogs.cc View 1 2 3 4 1 chunk +1 line, -5 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M chrome/common/metrics/caching_permuted_entropy_provider.cc View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M chrome/test/chromedriver/chrome_launcher.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M chrome/test/chromedriver/chrome_launcher_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M chrome/test/chromedriver/net/websocket.cc View 1 2 3 3 chunks +3 lines, -5 lines 0 comments Download
M components/policy/core/common/cloud/resource_cache.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/devtools/renderer_overrides_handler.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -18 lines 0 comments Download
M content/common/page_state_serialization_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/webkit_test_controller.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M content/shell/renderer/webkit_test_runner.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M extensions/common/extension.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M google_apis/cup/client_update_protocol.cc View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
M google_apis/gaia/oauth_request_signer.cc View 1 2 3 4 5 6 1 chunk +6 lines, -4 lines 0 comments Download
M jingle/notifier/listener/push_notifications_send_update_task.cc View 1 2 3 1 chunk +3 lines, -9 lines 0 comments Download
M jingle/notifier/listener/push_notifications_send_update_task_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/base/keygen_handler_win.cc View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
M net/cert/x509_certificate.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_auth_gssapi_posix.cc View 1 2 3 4 1 chunk +1 line, -5 lines 0 comments Download
M net/http/http_auth_handler_basic.cc View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M net/http/http_auth_handler_ntlm.cc View 1 2 3 4 1 chunk +1 line, -5 lines 0 comments Download
M net/http/http_auth_sspi_win.cc View 1 2 3 4 1 chunk +1 line, -5 lines 0 comments Download
M net/test/spawned_test_server/base_test_server.cc View 1 2 3 2 chunks +3 lines, -6 lines 0 comments Download
M net/third_party/mozilla_security_manager/nsKeygenHandler.cpp View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M net/websockets/websocket_basic_handshake_stream.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M net/websockets/websocket_handshake_handler.cc View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M remoting/base/rsa_key_pair.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M remoting/host/pin_hash.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M remoting/host/token_validator_factory_impl.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M remoting/protocol/auth_util.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M remoting/protocol/authenticator_test_base.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/pairing_registry.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M remoting/protocol/v2_authenticator.cc View 1 2 3 2 chunks +2 lines, -7 lines 0 comments Download
M sync/internal_api/public/base/unique_position_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sync/internal_api/sync_encryption_handler_impl.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M sync/protocol/proto_value_conversions.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M sync/syncable/syncable_util.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sync/test/fake_encryptor.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M sync/tools/null_invalidation_state_tracker.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sync/util/cryptographer.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M sync/util/nigori.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Adam Rice
7 years ago (2013-11-26 02:00:17 UTC) #1
Adam Rice
friendly ping
7 years ago (2013-12-05 03:09:32 UTC) #2
brettw
https://codereview.chromium.org/86913002/diff/1/base/base64.h File base/base64.h (right): https://codereview.chromium.org/86913002/diff/1/base/base64.h#newcode16 base/base64.h:16: BASE_EXPORT bool Base64Encode(const StringPiece& input, std::string* output); It seems ...
7 years ago (2013-12-05 06:33:56 UTC) #3
Adam Rice
Something like this?
7 years ago (2013-12-09 09:23:45 UTC) #4
brettw
LGTM with one style not. You can TBR the owners of the downstream modules for ...
7 years ago (2013-12-09 19:36:26 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/86913002/180001
7 years ago (2013-12-10 07:59:42 UTC) #6
commit-bot: I haz the power
7 years ago (2013-12-10 11:55:14 UTC) #7
Message was sent while issue was closed.
Change committed as 239759

Powered by Google App Engine
This is Rietveld 408576698