| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/bookmarks/bookmark_folder_editor_controller.h" | 5 #include "chrome/browser/bookmarks/bookmark_folder_editor_controller.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
| 13 | 13 |
| 14 BookmarkFolderEditorController::~BookmarkFolderEditorController() { | 14 BookmarkFolderEditorController::~BookmarkFolderEditorController() { |
| 15 if (model_) | 15 if (model_) |
| 16 model_->RemoveObserver(this); | 16 model_->RemoveObserver(this); |
| 17 } | 17 } |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 void BookmarkFolderEditorController::Show(Profile* profile, | 20 void BookmarkFolderEditorController::Show(Profile* profile, |
| 21 gfx::NativeWindow wnd, | 21 gfx::NativeWindow wnd, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 void BookmarkFolderEditorController::BookmarkModelChanged() { | 75 void BookmarkFolderEditorController::BookmarkModelChanged() { |
| 76 dialog_->Close(); | 76 dialog_->Close(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void BookmarkFolderEditorController::BookmarkModelBeingDeleted( | 79 void BookmarkFolderEditorController::BookmarkModelBeingDeleted( |
| 80 BookmarkModel* model) { | 80 BookmarkModel* model) { |
| 81 model_->RemoveObserver(this); | 81 model_->RemoveObserver(this); |
| 82 model_ = NULL; | 82 model_ = NULL; |
| 83 BookmarkModelChanged(); | 83 BookmarkModelChanged(); |
| 84 } | 84 } |
| OLD | NEW |