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

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

Issue 2802703004: Log creation for many dialog box types. (Closed)
Patch Set: Enums better match class names. Created 3 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
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_editor_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 title_tf_(NULL), 66 title_tf_(NULL),
67 parent_(parent), 67 parent_(parent),
68 details_(details), 68 details_(details),
69 bb_model_(BookmarkModelFactory::GetForBrowserContext(profile)), 69 bb_model_(BookmarkModelFactory::GetForBrowserContext(profile)),
70 running_menu_for_root_(false), 70 running_menu_for_root_(false),
71 show_tree_(configuration == SHOW_TREE) { 71 show_tree_(configuration == SHOW_TREE) {
72 DCHECK(profile); 72 DCHECK(profile);
73 DCHECK(bb_model_); 73 DCHECK(bb_model_);
74 DCHECK(bb_model_->client()->CanBeEditedByUser(parent)); 74 DCHECK(bb_model_->client()->CanBeEditedByUser(parent));
75 Init(); 75 Init();
76 chrome::RecordDialogCreation(chrome::DialogIdentifier::BOOKMARK_EDITOR);
76 } 77 }
77 78
78 BookmarkEditorView::~BookmarkEditorView() { 79 BookmarkEditorView::~BookmarkEditorView() {
79 // The tree model is deleted before the view. Reset the model otherwise the 80 // The tree model is deleted before the view. Reset the model otherwise the
80 // tree will reference a deleted model. 81 // tree will reference a deleted model.
81 if (tree_view_) 82 if (tree_view_)
82 tree_view_->SetModel(NULL); 83 tree_view_->SetModel(NULL);
83 bb_model_->RemoveObserver(this); 84 bb_model_->RemoveObserver(this);
84 } 85 }
85 86
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 Profile* profile, 668 Profile* profile,
668 const BookmarkEditor::EditDetails& details, 669 const BookmarkEditor::EditDetails& details,
669 BookmarkEditor::Configuration configuration) { 670 BookmarkEditor::Configuration configuration) {
670 DCHECK(profile); 671 DCHECK(profile);
671 BookmarkEditorView* editor = new BookmarkEditorView( 672 BookmarkEditorView* editor = new BookmarkEditorView(
672 profile, details.parent_node, details, configuration); 673 profile, details.parent_node, details, configuration);
673 editor->Show(parent_window); 674 editor->Show(parent_window);
674 } 675 }
675 676
676 } // namespace chrome 677 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc ('k') | chrome/browser/ui/views/confirm_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698