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

Side by Side Diff: chrome/browser/ui/webui/browsing_history_handler.cc

Issue 2619603002: Remove android_java_ui as it is not used (Closed)
Patch Set: Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browsing_history_handler.h" 5 #include "chrome/browser/ui/webui/browsing_history_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "ui/base/l10n/l10n_util.h" 48 #include "ui/base/l10n/l10n_util.h"
49 #include "ui/base/l10n/time_format.h" 49 #include "ui/base/l10n/time_format.h"
50 50
51 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) 51 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
52 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" 52 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h"
53 #include "chrome/browser/supervised_user/supervised_user_service.h" 53 #include "chrome/browser/supervised_user/supervised_user_service.h"
54 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 54 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
55 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" 55 #include "chrome/browser/supervised_user/supervised_user_url_filter.h"
56 #endif 56 #endif
57 57
58 #if BUILDFLAG(ANDROID_JAVA_UI) 58 #if defined(OS_ANDROID)
59 #include "chrome/browser/android/chrome_application.h" 59 #include "chrome/browser/android/chrome_application.h"
60 #endif 60 #endif
61 61
62 #if !defined(OS_ANDROID) 62 #if !defined(OS_ANDROID)
Ted C 2017/01/06 22:33:30 make an #else with above
F 2017/01/09 21:36:33 Done.
63 #include "chrome/browser/ui/webui/md_history_ui.h" 63 #include "chrome/browser/ui/webui/md_history_ui.h"
64 #endif 64 #endif
65 65
66 // Number of chars to truncate titles when making them "short". 66 // Number of chars to truncate titles when making them "short".
67 static const size_t kShortTitleLength = 300; 67 static const size_t kShortTitleLength = 300;
68 68
69 using bookmarks::BookmarkModel; 69 using bookmarks::BookmarkModel;
70 70
71 namespace { 71 namespace {
72 72
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 items_to_remove.push_back(std::move(entry)); 399 items_to_remove.push_back(std::move(entry));
400 } 400 }
401 401
402 browsing_history_service_->RemoveVisits(&items_to_remove); 402 browsing_history_service_->RemoveVisits(&items_to_remove);
403 items_to_remove.clear(); 403 items_to_remove.clear();
404 } 404 }
405 405
406 void BrowsingHistoryHandler::HandleClearBrowsingData( 406 void BrowsingHistoryHandler::HandleClearBrowsingData(
407 const base::ListValue* args) { 407 const base::ListValue* args) {
408 #if BUILDFLAG(ANDROID_JAVA_UI) 408 #if defined(OS_ANDROID)
409 chrome::android::ChromeApplication::OpenClearBrowsingData( 409 chrome::android::ChromeApplication::OpenClearBrowsingData(
410 web_ui()->GetWebContents()); 410 web_ui()->GetWebContents());
411 #else 411 #else
412 // TODO(beng): This is an improper direct dependency on Browser. Route this 412 // TODO(beng): This is an improper direct dependency on Browser. Route this
413 // through some sort of delegate. 413 // through some sort of delegate.
414 Browser* browser = chrome::FindBrowserWithWebContents( 414 Browser* browser = chrome::FindBrowserWithWebContents(
415 web_ui()->GetWebContents()); 415 web_ui()->GetWebContents());
416 chrome::ShowClearBrowsingDataDialog(browser); 416 chrome::ShowClearBrowsingDataDialog(browser);
417 #endif 417 #endif
418 } 418 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); 541 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted");
542 } 542 }
543 543
544 void BrowsingHistoryHandler::HasOtherFormsOfBrowsingHistory( 544 void BrowsingHistoryHandler::HasOtherFormsOfBrowsingHistory(
545 bool has_other_forms, 545 bool has_other_forms,
546 bool has_synced_results) { 546 bool has_synced_results) {
547 web_ui()->CallJavascriptFunctionUnsafe( 547 web_ui()->CallJavascriptFunctionUnsafe(
548 "showNotification", base::FundamentalValue(has_synced_results), 548 "showNotification", base::FundamentalValue(has_synced_results),
549 base::FundamentalValue(has_other_forms)); 549 base::FundamentalValue(has_other_forms));
550 } 550 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698