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

Side by Side Diff: chrome/browser/gtk/keyword_editor_view.cc

Issue 259029: Remove a NOTREACHED from the keyword editor dialog. To hit, (Closed)
Patch Set: Created 11 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/gtk/keyword_editor_view.h" 5 #include "chrome/browser/gtk/keyword_editor_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/gfx/gtk_util.h" 8 #include "base/gfx/gtk_util.h"
9 #include "chrome/browser/gtk/edit_search_engine_dialog.h" 9 #include "chrome/browser/gtk/edit_search_engine_dialog.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 GTK_WINDOW(gtk_widget_get_toplevel(editor->dialog_)), 440 GTK_WINDOW(gtk_widget_get_toplevel(editor->dialog_)),
441 NULL, 441 NULL,
442 editor, 442 editor,
443 editor->profile_); 443 editor->profile_);
444 } 444 }
445 445
446 // static 446 // static
447 void KeywordEditorView::OnEditButtonClicked(GtkButton* button, 447 void KeywordEditorView::OnEditButtonClicked(GtkButton* button,
448 KeywordEditorView* editor) { 448 KeywordEditorView* editor) {
449 int model_row = editor->GetSelectedModelRow(); 449 int model_row = editor->GetSelectedModelRow();
450 if (model_row == -1) { 450 if (model_row == -1)
451 NOTREACHED();
452 return; 451 return;
453 } 452
454 new EditSearchEngineDialog( 453 new EditSearchEngineDialog(
455 GTK_WINDOW(gtk_widget_get_toplevel(editor->dialog_)), 454 GTK_WINDOW(gtk_widget_get_toplevel(editor->dialog_)),
456 editor->controller_->GetTemplateURL(model_row), 455 editor->controller_->GetTemplateURL(model_row),
457 editor, 456 editor,
458 editor->profile_); 457 editor->profile_);
459 } 458 }
460 459
461 // static 460 // static
462 void KeywordEditorView::OnRemoveButtonClicked(GtkButton* button, 461 void KeywordEditorView::OnRemoveButtonClicked(GtkButton* button,
463 KeywordEditorView* editor) { 462 KeywordEditorView* editor) {
(...skipping 15 matching lines...) Expand all
479 int model_row = editor->GetSelectedModelRow(); 478 int model_row = editor->GetSelectedModelRow();
480 if (model_row == -1) { 479 if (model_row == -1) {
481 NOTREACHED(); 480 NOTREACHED();
482 return; 481 return;
483 } 482 }
484 int new_index = editor->controller_->MakeDefaultTemplateURL(model_row); 483 int new_index = editor->controller_->MakeDefaultTemplateURL(model_row);
485 if (new_index > 0) { 484 if (new_index > 0) {
486 editor->SelectModelRow(new_index); 485 editor->SelectModelRow(new_index);
487 } 486 }
488 } 487 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698