OLD | NEW |
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/views/bookmark_manager_view.h" | 5 #include "chrome/browser/views/bookmark_manager_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/gfx/canvas.h" | 9 #include "app/gfx/canvas.h" |
10 #include "app/gfx/color_utils.h" | 10 #include "app/gfx/color_utils.h" |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 if (id == IDS_BOOKMARK_MANAGER_IMPORT_MENU) { | 597 if (id == IDS_BOOKMARK_MANAGER_IMPORT_MENU) { |
598 // ImporterHost is ref counted and will delete itself when done. | 598 // ImporterHost is ref counted and will delete itself when done. |
599 ImporterHost* host = new ImporterHost(); | 599 ImporterHost* host = new ImporterHost(); |
600 ProfileInfo profile_info; | 600 ProfileInfo profile_info; |
601 profile_info.browser_type = BOOKMARKS_HTML; | 601 profile_info.browser_type = BOOKMARKS_HTML; |
602 profile_info.source_path = path.ToWStringHack(); | 602 profile_info.source_path = path.ToWStringHack(); |
603 StartImportingWithUI(GetWidget()->GetNativeView(), FAVORITES, host, | 603 StartImportingWithUI(GetWidget()->GetNativeView(), FAVORITES, host, |
604 profile_info, profile_, | 604 profile_info, profile_, |
605 new ImportObserverImpl(profile()), false); | 605 new ImportObserverImpl(profile()), false); |
606 } else if (id == IDS_BOOKMARK_MANAGER_EXPORT_MENU) { | 606 } else if (id == IDS_BOOKMARK_MANAGER_EXPORT_MENU) { |
607 if (g_browser_process->io_thread()) { | 607 bookmark_html_writer::WriteBookmarks(GetBookmarkModel(), path); |
608 bookmark_html_writer::WriteBookmarks( | |
609 g_browser_process->io_thread()->message_loop(), GetBookmarkModel(), | |
610 path); | |
611 } | |
612 } else { | 608 } else { |
613 NOTREACHED(); | 609 NOTREACHED(); |
614 } | 610 } |
615 } | 611 } |
616 | 612 |
617 void BookmarkManagerView::FileSelectionCanceled(void* params) { | 613 void BookmarkManagerView::FileSelectionCanceled(void* params) { |
618 select_file_dialog_ = NULL; | 614 select_file_dialog_ = NULL; |
619 } | 615 } |
620 | 616 |
621 BookmarkTableModel* BookmarkManagerView::CreateSearchTableModel() { | 617 BookmarkTableModel* BookmarkManagerView::CreateSearchTableModel() { |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 if (!sync_service_) | 836 if (!sync_service_) |
841 return; | 837 return; |
842 if (sync_service_->HasSyncSetupCompleted()) { | 838 if (sync_service_->HasSyncSetupCompleted()) { |
843 ShowOptionsWindow(OPTIONS_PAGE_CONTENT, OPTIONS_GROUP_NONE, profile_); | 839 ShowOptionsWindow(OPTIONS_PAGE_CONTENT, OPTIONS_GROUP_NONE, profile_); |
844 } else { | 840 } else { |
845 sync_service_->EnableForUser(); | 841 sync_service_->EnableForUser(); |
846 ProfileSyncService::SyncEvent( | 842 ProfileSyncService::SyncEvent( |
847 ProfileSyncService::START_FROM_BOOKMARK_MANAGER); | 843 ProfileSyncService::START_FROM_BOOKMARK_MANAGER); |
848 } | 844 } |
849 } | 845 } |
OLD | NEW |