| 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/extensions/extension_bookmarks_module.h" | 5 #include "chrome/browser/extensions/extension_bookmarks_module.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/sha1.h" | 8 #include "base/sha1.h" |
| 9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void BookmarksFunction::Observe(NotificationType type, | 68 void BookmarksFunction::Observe(NotificationType type, |
| 69 const NotificationSource& source, | 69 const NotificationSource& source, |
| 70 const NotificationDetails& details) { | 70 const NotificationDetails& details) { |
| 71 DCHECK(type == NotificationType::BOOKMARK_MODEL_LOADED); | 71 DCHECK(type == NotificationType::BOOKMARK_MODEL_LOADED); |
| 72 DCHECK(profile()->GetBookmarkModel()->IsLoaded()); | 72 DCHECK(profile()->GetBookmarkModel()->IsLoaded()); |
| 73 Run(); | 73 Run(); |
| 74 Release(); // Balanced in Run(). | 74 Release(); // Balanced in Run(). |
| 75 } | 75 } |
| 76 | 76 |
| 77 // static | 77 // static |
| 78 ExtensionBookmarkEventRouter* ExtensionBookmarkEventRouter::GetSingleton() { | 78 ExtensionBookmarkEventRouter* ExtensionBookmarkEventRouter::GetInstance() { |
| 79 return Singleton<ExtensionBookmarkEventRouter>::get(); | 79 return Singleton<ExtensionBookmarkEventRouter>::get(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 ExtensionBookmarkEventRouter::ExtensionBookmarkEventRouter() { | 82 ExtensionBookmarkEventRouter::ExtensionBookmarkEventRouter() { |
| 83 } | 83 } |
| 84 | 84 |
| 85 ExtensionBookmarkEventRouter::~ExtensionBookmarkEventRouter() { | 85 ExtensionBookmarkEventRouter::~ExtensionBookmarkEventRouter() { |
| 86 } | 86 } |
| 87 | 87 |
| 88 void ExtensionBookmarkEventRouter::Observe(BookmarkModel* model) { | 88 void ExtensionBookmarkEventRouter::Observe(BookmarkModel* model) { |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE); | 819 SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE); |
| 820 return true; | 820 return true; |
| 821 } | 821 } |
| 822 | 822 |
| 823 void ExportBookmarksFunction::FileSelected(const FilePath& path, | 823 void ExportBookmarksFunction::FileSelected(const FilePath& path, |
| 824 int index, | 824 int index, |
| 825 void* params) { | 825 void* params) { |
| 826 bookmark_html_writer::WriteBookmarks(profile(), path, NULL); | 826 bookmark_html_writer::WriteBookmarks(profile(), path, NULL); |
| 827 Release(); // Balanced in BookmarksIOFunction::SelectFile() | 827 Release(); // Balanced in BookmarksIOFunction::SelectFile() |
| 828 } | 828 } |
| OLD | NEW |