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

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

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ui/webui/history/browsing_history_handler.h" 5 #include "ios/chrome/browser/ui/webui/history/browsing_history_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 base::ListValue results_value; 617 base::ListValue results_value;
618 for (const BrowsingHistoryHandler::HistoryEntry& entry : query_results_) { 618 for (const BrowsingHistoryHandler::HistoryEntry& entry : query_results_) {
619 std::unique_ptr<base::Value> value( 619 std::unique_ptr<base::Value> value(
620 entry.ToValue(bookmark_model, nullptr, sync_service)); 620 entry.ToValue(bookmark_model, nullptr, sync_service));
621 results_value.Append(value.release()); 621 results_value.Append(value.release());
622 } 622 }
623 623
624 web_ui()->CallJavascriptFunction("historyResult", results_info_value_, 624 web_ui()->CallJavascriptFunction("historyResult", results_info_value_,
625 results_value); 625 results_value);
626 web_ui()->CallJavascriptFunction( 626 web_ui()->CallJavascriptFunction(
627 "showNotification", base::FundamentalValue(has_synced_results_), 627 "showNotification", base::Value(has_synced_results_),
628 base::FundamentalValue(has_other_forms_of_browsing_history_)); 628 base::Value(has_other_forms_of_browsing_history_));
629 results_info_value_.Clear(); 629 results_info_value_.Clear();
630 query_results_.clear(); 630 query_results_.clear();
631 web_history_query_results_.clear(); 631 web_history_query_results_.clear();
632 } 632 }
633 633
634 void BrowsingHistoryHandler::QueryComplete(const base::string16& search_text, 634 void BrowsingHistoryHandler::QueryComplete(const base::string16& search_text,
635 const history::QueryOptions& options, 635 const history::QueryOptions& options,
636 history::QueryResults* results) { 636 history::QueryResults* results) {
637 DCHECK_EQ(0U, query_results_.size()); 637 DCHECK_EQ(0U, query_results_.size());
638 query_results_.reserve(results->size()); 638 query_results_.reserve(results->size());
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 if (!query_task_tracker_.HasTrackedTasks()) 752 if (!query_task_tracker_.HasTrackedTasks())
753 ReturnResultsToFrontEnd(); 753 ReturnResultsToFrontEnd();
754 } 754 }
755 755
756 void BrowsingHistoryHandler::OtherFormsOfBrowsingHistoryQueryComplete( 756 void BrowsingHistoryHandler::OtherFormsOfBrowsingHistoryQueryComplete(
757 bool found_other_forms_of_browsing_history) { 757 bool found_other_forms_of_browsing_history) {
758 has_other_forms_of_browsing_history_ = found_other_forms_of_browsing_history; 758 has_other_forms_of_browsing_history_ = found_other_forms_of_browsing_history;
759 RecordMetricsForNoticeAboutOtherFormsOfBrowsingHistory( 759 RecordMetricsForNoticeAboutOtherFormsOfBrowsingHistory(
760 has_other_forms_of_browsing_history_); 760 has_other_forms_of_browsing_history_);
761 web_ui()->CallJavascriptFunction( 761 web_ui()->CallJavascriptFunction(
762 "showNotification", base::FundamentalValue(has_synced_results_), 762 "showNotification", base::Value(has_synced_results_),
763 base::FundamentalValue(has_other_forms_of_browsing_history_)); 763 base::Value(has_other_forms_of_browsing_history_));
764 } 764 }
765 765
766 void BrowsingHistoryHandler::RemoveComplete() { 766 void BrowsingHistoryHandler::RemoveComplete() {
767 urls_to_be_deleted_.clear(); 767 urls_to_be_deleted_.clear();
768 768
769 // Notify the page that the deletion request is complete, but only if a web 769 // Notify the page that the deletion request is complete, but only if a web
770 // history delete request is not still pending. 770 // history delete request is not still pending.
771 if (!has_pending_delete_request_) 771 if (!has_pending_delete_request_)
772 web_ui()->CallJavascriptFunction("deleteComplete"); 772 web_ui()->CallJavascriptFunction("deleteComplete");
773 } 773 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 851
852 void BrowsingHistoryHandler::OnURLsDeleted( 852 void BrowsingHistoryHandler::OnURLsDeleted(
853 history::HistoryService* history_service, 853 history::HistoryService* history_service,
854 bool all_history, 854 bool all_history,
855 bool expired, 855 bool expired,
856 const history::URLRows& deleted_rows, 856 const history::URLRows& deleted_rows,
857 const std::set<GURL>& favicon_urls) { 857 const std::set<GURL>& favicon_urls) {
858 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) 858 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_))
859 web_ui()->CallJavascriptFunction("historyDeleted"); 859 web_ui()->CallJavascriptFunction("historyDeleted");
860 } 860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698