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

Issue 193040: [Mac] Implement the search engine manager (Closed)

Created:
11 years, 3 months ago by Robert Sesek
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, pink (ping after 24hrs)
Visibility:
Public.

Description

[Mac] Implement the search engine manager * Enable the Manage search engines button in Preferences * New search engines can be added using the "+" button * Existing search engines can be edited via double-click * Existing search engines can be removed with the "-" button * The "Make Default" button has the same behavior as the list box in the Basics preferences "Default Search" BUG=16187 TEST=Go to Preferences, click "Manage" next to "Default Search" and add/edit/remove engines. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26078

Patch Set 1 #

Patch Set 2 : Localize, add tool tips #

Total comments: 31

Patch Set 3 : '' #

Total comments: 37

Patch Set 4 : '' #

Total comments: 3

Patch Set 5 : Final patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3693 lines, -100 lines) Patch
M DEPS View 1 chunk +1 line, -1 line 0 comments Download
A chrome/app/nibs/EditSearchEngine.xib View 1 2 1 chunk +1503 lines, -0 lines 0 comments Download
A chrome/app/nibs/KeywordEditor.xib View 1 1 chunk +1281 lines, -0 lines 0 comments Download
M chrome/app/nibs/Preferences.xib View 1 2 3 4 63 chunks +174 lines, -99 lines 0 comments Download
A chrome/browser/cocoa/edit_search_engine_cocoa_controller.h View 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/edit_search_engine_cocoa_controller.mm View 1 chunk +131 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm View 1 chunk +219 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/keyword_editor_cocoa_controller.h View 1 chunk +67 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/keyword_editor_cocoa_controller.mm View 1 chunk +198 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm View 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/preferences_window_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/cocoa/preferences_window_controller.mm View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 7 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Robert Sesek
11 years, 3 months ago (2009-09-08 04:22:42 UTC) #1
Robert Sesek
CC+pink because he is on the bug CC+TVL for localization
11 years, 3 months ago (2009-09-09 14:42:59 UTC) #2
rohitrao (ping after 24h)
Mostly naming nits below, LGTM otherwise. Didn't look at the xib files or anything related ...
11 years, 3 months ago (2009-09-09 16:50:09 UTC) #3
TVL
lgtm http://codereview.chromium.org/193040/diff/3001/4004 File chrome/browser/cocoa/edit_search_engine_controller_cocoa.h (right): http://codereview.chromium.org/193040/diff/3001/4004#newcode19 Line 19: IBOutlet NSTextField* nameField_; @private? http://codereview.chromium.org/193040/diff/3001/4004#newcode29 Line 29: ...
11 years, 3 months ago (2009-09-09 21:54:07 UTC) #4
Scott Hess - ex-Googler
Sorry for the review delay. Unfortunately, I've gotta get going, so I'll have to add ...
11 years, 3 months ago (2009-09-10 19:25:37 UTC) #5
Robert Sesek
http://codereview.chromium.org/193040/diff/3001/4004 File chrome/browser/cocoa/edit_search_engine_controller_cocoa.h (right): http://codereview.chromium.org/193040/diff/3001/4004#newcode1 Line 1: // Copyright (c) 2009 The Chromium Authors. All ...
11 years, 3 months ago (2009-09-10 20:52:03 UTC) #6
Scott Hess - ex-Googler
I'm semi-concerned about your use of +alloc/-init then a separate -makeKeyAndOrderFront:, with -autorelease on close. ...
11 years, 3 months ago (2009-09-11 18:42:07 UTC) #7
Robert Sesek
> I'm semi-concerned about your use of +alloc/-init then a separate > -makeKeyAndOrderFront:, with -autorelease ...
11 years, 3 months ago (2009-09-11 21:58:11 UTC) #8
Scott Hess - ex-Googler
11 years, 3 months ago (2009-09-11 22:24:29 UTC) #9
LGTM, with my comments applied.

MUST double-check chrome.gyp before checking in!  I don't know what you've got
going on, I suspect an automerge-gone-awry.

Also, TVL (or Rohit) had a naming comment to deal with before check-in.

http://codereview.chromium.org/193040/diff/9002/2009
File chrome/browser/cocoa/keyword_editor_controller_cocoa.mm (right):

http://codereview.chromium.org/193040/diff/9002/2009#newcode114
Line 114: DCHECK([selection count] > 0);
On 2009/09/11 21:58:11, rsesek wrote:
> On 2009/09/11 18:42:07, shess wrote:
> > DCHECK_GT will give better diagnostics.
> 
> Done here and elsewhere, but because |-count| returns an NSUInteger, we have
to
> cast to int so we don't get warnings...

That's fine.  Somewhere I have a little bit of code exploring adding appropriate
magic to make some things like this work nicer on Mac (like DCHECK_OBJCEQ
printing out the descriptions when the objects !=).  Anyhow, getting log output
with the specific values (which DCHECK_GT does) generally way outweighs the
minor cost of adding a cast here or there.

http://codereview.chromium.org/193040/diff/14/1024#newcode113
Line 113: NSIndexSet* selection = [tableView_ selectedRowIndexes];
Unfortunately, (int) is frowned on.  Has to be static_cast<int>(...).  So
lovely!

Fortunately, a better solution is:
  DCHECK_GT([selection count], 0U);

http://codereview.chromium.org/193040/diff/14/1024#newcode123
Line 123: NSIndexSet* selection = [tableView_ selectedRowIndexes];
Here too.

http://codereview.chromium.org/193040/diff/14/1028
File chrome/chrome.gyp (right):

http://codereview.chromium.org/193040/diff/14/1028#newcode78
Line 78: 'browser/extensions/extension_i18n_apitest.cc',
WARNING!  You've got something wrong going on with a merge somewhere!

Powered by Google App Engine
This is Rietveld 408576698