Commit 5ca6ed11 authored by groby@chromium.org's avatar groby@chromium.org

Restrict throbber messages to SingleSuggestionView objects.

R=rsesek@chromium.org
BUG=129176, 129082
TEST=Try to install the first item from suggestion list. Without this fix, that will crash.

Review URL: https://chromiumcodereview.appspot.com/10417027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138305 0039d316-1c4b-4281-b951-d872f2087c98
parent fd3238af
...@@ -410,16 +410,21 @@ NSButton* CreateHyperlinkButton(NSString* title, const NSRect& frame) { ...@@ -410,16 +410,21 @@ NSButton* CreateHyperlinkButton(NSString* title, const NSRect& frame) {
- (void)startThrobberForRow:(NSInteger)index { - (void)startThrobberForRow:(NSInteger)index {
for (SingleSuggestionView* row in [self subviews]) { for (SingleSuggestionView* row in [self subviews]) {
[row setEnabled:NO]; if ([row isMemberOfClass:[SingleSuggestionView class]]) {
if ([row tag] == index) [row setEnabled:NO];
[row startThrobber]; if ([row tag] == index) {
[row startThrobber];
}
}
} }
} }
- (void)stopThrobber { - (void)stopThrobber {
for (SingleSuggestionView* row in [self subviews]) { for (SingleSuggestionView* row in [self subviews]) {
[row stopThrobber]; if ([row isMemberOfClass:[SingleSuggestionView class]]) {
[row setEnabled:YES]; [row stopThrobber];
[row setEnabled:YES];
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment