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

Issue 517054: Remove all uses of EmptyString16(), EmptyWString(), and EmptyGURL(), and thei... (Closed)

Created:
10 years, 11 months ago by Peter Kasting
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, michaeln, brettw+cc_chromium.org, ben+cc_chromium.org, John Grabowski, Erik does not do reviews, Paul Godavari, jam, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Remove most uses of EmptyString(), EmptyWString(), EmptyString16(), and EmptyGURL(), since the code in question can just use the default constructor. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35766

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 3

Patch Set 4 : '' #

Total comments: 4

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -158 lines) Patch
M base/string_util.h View 1 2 3 1 chunk +9 lines, -4 lines 0 comments Download
M chrome/browser/autofill/address.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autofill/contact_info.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/autofill/credit_card.cc View 3 5 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/autofill/form_group.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/gtk/tabs/tab_strip_gtk.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/history/history.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/plugin_process_host.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/test/site_instance_unittest.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/test/test_render_view_host.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/shell_integration_win.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/tab_contents/web_contents_unittest.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/toolbar_model.cc View 1 2 3 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/views/bug_report_view.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/views/options/cookies_view.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/views/options/general_page_view.cc View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/webdata/web_data_service_unittest.cc View 1 2 3 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/common/platform_util_mac.mm View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/platform_util_win.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 3 chunks +6 lines, -6 lines 0 comments Download
M views/controls/message_box_view.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/appcache/appcache_group.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/appcache/appcache_host.cc View 1 2 3 4 chunks +5 lines, -5 lines 0 comments Download
M webkit/appcache/appcache_host_unittest.cc View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M webkit/appcache/appcache_request_handler.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/appcache/appcache_storage_impl.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/appcache/appcache_storage_unittest.cc View 1 2 3 2 chunks +4 lines, -6 lines 0 comments Download
M webkit/appcache/appcache_update_job_unittest.cc View 1 2 3 33 chunks +35 lines, -35 lines 0 comments Download
M webkit/appcache/appcache_url_request_job_unittest.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/appcache/manifest_parser_unittest.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/appcache/mock_appcache_storage.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M webkit/appcache/web_application_cache_host_impl.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/database/database_tracker.h View 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/glue/simple_webmimeregistry_impl.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/tools/test_shell/test_webview_delegate.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Peter Kasting
10 years, 11 months ago (2010-01-07 00:40:50 UTC) #1
brettw
http://codereview.chromium.org/517054/diff/4001/4025 File chrome/browser/autofill/form_group.h (right): http://codereview.chromium.org/517054/diff/4001/4025#newcode11 chrome/browser/autofill/form_group.h:11: #include "base/string_util.h" I bet you can now remove this ...
10 years, 11 months ago (2010-01-07 06:21:43 UTC) #2
Peter Kasting
http://codereview.chromium.org/517054/diff/4001/4040 File chrome/browser/tab_contents/tab_contents.h (left): http://codereview.chromium.org/517054/diff/4001/4040#oldcode194 chrome/browser/tab_contents/tab_contents.h:194: virtual const GURL& GetURL() const; On 2010/01/07 06:21:44, brettw ...
10 years, 11 months ago (2010-01-07 06:58:33 UTC) #3
darin (slow to review)
On Wed, Jan 6, 2010 at 10:58 PM, <pkasting@chromium.org> wrote: > > http://codereview.chromium.org/517054/diff/4001/4040 > File ...
10 years, 11 months ago (2010-01-07 07:55:03 UTC) #4
darin (slow to review)
To clarify, I think that much of this CL is really great. It should be ...
10 years, 11 months ago (2010-01-07 07:57:11 UTC) #5
Peter Kasting
On 2010/01/07 07:55:03, darin wrote: > I'm also unhappy with this change. It is good ...
10 years, 11 months ago (2010-01-07 08:05:34 UTC) #6
Peter Kasting
On Thu, Jan 7, 2010 at 12:05 AM, <pkasting@chromium.org> wrote: > We've been _extremely_ clear, ...
10 years, 11 months ago (2010-01-07 08:48:57 UTC) #7
darin (slow to review)
To be clear, there was a significant code size difference between return by reference and ...
10 years, 11 months ago (2010-01-07 08:53:18 UTC) #8
brettw
On Thu, Jan 7, 2010 at 6:58 AM, <pkasting@chromium.org> wrote: > > http://codereview.chromium.org/517054/diff/4001/4040 > File ...
10 years, 11 months ago (2010-01-07 19:27:11 UTC) #9
Peter Kasting
I believe I have removed all the cases where I changed return-by-const-ref to return-by-value. Let ...
10 years, 11 months ago (2010-01-07 21:18:49 UTC) #10
darin (slow to review)
LGTM, except i think i spotted a bug in the existing code... http://codereview.chromium.org/517054/diff/2026/3101 File chrome/browser/autofill/address.cc ...
10 years, 11 months ago (2010-01-07 21:34:08 UTC) #11
Peter Kasting
10 years, 11 months ago (2010-01-07 22:10:37 UTC) #12
http://codereview.chromium.org/517054/diff/2026/3101
File chrome/browser/autofill/address.cc (right):

http://codereview.chromium.org/517054/diff/2026/3101#newcode69
chrome/browser/autofill/address.cc:69: string16 Address::GetFieldText(const
AutoFillType& type) const {
On 2010/01/07 21:34:08, darin wrote:
> this is a great example of a method that should return |const string16&|.  all
> of the submethods, line1, line2, etc. should also be changed to return |const
> string16&|.  doing so would reduce code bloat.  this can be done as a separate
> CL.

Filed a bug against jhawkins since lots of autofill code looks like it uses
these patterns.

http://codereview.chromium.org/517054/diff/2026/3098
File chrome/browser/autofill/contact_info.cc (right):

http://codereview.chromium.org/517054/diff/2026/3098#newcode87
chrome/browser/autofill/contact_info.cc:87: MiddleInitial();
On 2010/01/07 21:34:08, darin wrote:
> was this supposed to have a return statement on it?  looks like a bug to me.

I bet it was.  I added one.

Powered by Google App Engine
This is Rietveld 408576698