OLD | NEW |
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/webui/history_ui.h" | 5 #include "chrome/browser/ui/webui/history_ui.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #include "chrome/browser/extensions/activity_log/activity_log.h" | 65 #include "chrome/browser/extensions/activity_log/activity_log.h" |
66 #endif | 66 #endif |
67 | 67 |
68 #if defined(ENABLE_SUPERVISED_USERS) | 68 #if defined(ENABLE_SUPERVISED_USERS) |
69 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" | 69 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" |
70 #include "chrome/browser/supervised_user/supervised_user_service.h" | 70 #include "chrome/browser/supervised_user/supervised_user_service.h" |
71 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 71 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
72 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | 72 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" |
73 #endif | 73 #endif |
74 | 74 |
75 #if defined(OS_ANDROID) | 75 #if defined(ANDROID_JAVA_UI) |
76 #include "chrome/browser/android/chrome_application.h" | 76 #include "chrome/browser/android/chrome_application.h" |
77 #endif | 77 #endif |
78 | 78 |
79 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 79 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
80 #include "chrome/browser/ui/webui/foreign_session_handler.h" | 80 #include "chrome/browser/ui/webui/foreign_session_handler.h" |
81 #include "chrome/browser/ui/webui/history_login_handler.h" | 81 #include "chrome/browser/ui/webui/history_login_handler.h" |
82 #endif | 82 #endif |
83 | 83 |
84 using bookmarks::BookmarkModel; | 84 using bookmarks::BookmarkModel; |
85 | 85 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 activity_log->RemoveURLs(it->urls); | 684 activity_log->RemoveURLs(it->urls); |
685 } | 685 } |
686 #endif | 686 #endif |
687 | 687 |
688 for (const history::ExpireHistoryArgs& expire_entry : expire_list) | 688 for (const history::ExpireHistoryArgs& expire_entry : expire_list) |
689 AppBannerSettingsHelper::ClearHistoryForURLs(profile, expire_entry.urls); | 689 AppBannerSettingsHelper::ClearHistoryForURLs(profile, expire_entry.urls); |
690 } | 690 } |
691 | 691 |
692 void BrowsingHistoryHandler::HandleClearBrowsingData( | 692 void BrowsingHistoryHandler::HandleClearBrowsingData( |
693 const base::ListValue* args) { | 693 const base::ListValue* args) { |
694 #if defined(OS_ANDROID) | 694 #if defined(ANDROID_JAVA_UI) |
695 chrome::android::ChromeApplication::OpenClearBrowsingData( | 695 chrome::android::ChromeApplication::OpenClearBrowsingData( |
696 web_ui()->GetWebContents()); | 696 web_ui()->GetWebContents()); |
697 #else | 697 #else |
698 // TODO(beng): This is an improper direct dependency on Browser. Route this | 698 // TODO(beng): This is an improper direct dependency on Browser. Route this |
699 // through some sort of delegate. | 699 // through some sort of delegate. |
700 Browser* browser = chrome::FindBrowserWithWebContents( | 700 Browser* browser = chrome::FindBrowserWithWebContents( |
701 web_ui()->GetWebContents()); | 701 web_ui()->GetWebContents()); |
702 chrome::ShowClearBrowsingDataDialog(browser); | 702 chrome::ShowClearBrowsingDataDialog(browser); |
703 #endif | 703 #endif |
704 } | 704 } |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 } | 1055 } |
1056 | 1056 |
1057 HistoryUI::~HistoryUI() {} | 1057 HistoryUI::~HistoryUI() {} |
1058 | 1058 |
1059 // static | 1059 // static |
1060 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( | 1060 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( |
1061 ui::ScaleFactor scale_factor) { | 1061 ui::ScaleFactor scale_factor) { |
1062 return ResourceBundle::GetSharedInstance(). | 1062 return ResourceBundle::GetSharedInstance(). |
1063 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); | 1063 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); |
1064 } | 1064 } |
OLD | NEW |