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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc

Issue 10084030: views: Fix some DCHECKs to use (expected, actual) order. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: peter review -> revert one case Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/infobars/extension_infobar.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/bookmarks/bookmark_bubble_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 content::RecordAction(UserMetricsAction("BookmarkBubble_EditFromCombobox")); 291 content::RecordAction(UserMetricsAction("BookmarkBubble_EditFromCombobox"));
292 ShowEditor(); 292 ShowEditor();
293 } 293 }
294 } 294 }
295 295
296 void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) { 296 void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) {
297 if (sender == edit_button_) { 297 if (sender == edit_button_) {
298 content::RecordAction(UserMetricsAction("BookmarkBubble_Edit")); 298 content::RecordAction(UserMetricsAction("BookmarkBubble_Edit"));
299 ShowEditor(); 299 ShowEditor();
300 } else { 300 } else {
301 DCHECK_EQ(sender, close_button_); 301 DCHECK_EQ(close_button_, sender);
302 StartFade(false); 302 StartFade(false);
303 } 303 }
304 } 304 }
305 305
306 void BookmarkBubbleView::ShowEditor() { 306 void BookmarkBubbleView::ShowEditor() {
307 const BookmarkNode* node = 307 const BookmarkNode* node =
308 profile_->GetBookmarkModel()->GetMostRecentlyAddedNodeForURL(url_); 308 profile_->GetBookmarkModel()->GetMostRecentlyAddedNodeForURL(url_);
309 views::Widget* parent = anchor_view()->GetWidget(); 309 views::Widget* parent = anchor_view()->GetWidget();
310 Profile* profile = profile_; 310 Profile* profile = profile_;
311 ApplyEdits(); 311 ApplyEdits();
(...skipping 23 matching lines...) Expand all
335 const BookmarkNode* new_parent = 335 const BookmarkNode* new_parent =
336 parent_model_.GetNodeAt(parent_combobox_->selected_index()); 336 parent_model_.GetNodeAt(parent_combobox_->selected_index());
337 if (new_parent != node->parent()) { 337 if (new_parent != node->parent()) {
338 content::RecordAction( 338 content::RecordAction(
339 UserMetricsAction("BookmarkBubble_ChangeParent")); 339 UserMetricsAction("BookmarkBubble_ChangeParent"));
340 model->Move(node, new_parent, new_parent->child_count()); 340 model->Move(node, new_parent, new_parent->child_count());
341 } 341 }
342 } 342 }
343 } 343 }
344 } 344 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/infobars/extension_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698