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

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

Issue 2684493002: MD History: Delete Grouped History (Closed)
Patch Set: Rebase Created 3 years, 10 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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 515
516 // Add the specific dates that were searched to display them. 516 // Add the specific dates that were searched to display them.
517 // TODO(sergiu): Put today if the start is in the future. 517 // TODO(sergiu): Put today if the start is in the future.
518 results_info.SetString( 518 results_info.SetString(
519 "queryStartTime", 519 "queryStartTime",
520 GetRelativeDateLocalized(clock_.get(), query_results_info->start_time)); 520 GetRelativeDateLocalized(clock_.get(), query_results_info->start_time));
521 results_info.SetString( 521 results_info.SetString(
522 "queryEndTime", 522 "queryEndTime",
523 GetRelativeDateLocalized(clock_.get(), query_results_info->end_time)); 523 GetRelativeDateLocalized(clock_.get(), query_results_info->end_time));
524 524
525 // TODO(calamity): Clean up grouped-specific fields once grouped history is
526 // removed.
525 results_info.SetString( 527 results_info.SetString(
526 "queryStartMonth", 528 "queryStartMonth",
527 base::TimeFormatMonthAndYear(query_results_info->start_time)); 529 base::TimeFormatMonthAndYear(query_results_info->start_time));
528 results_info.SetString( 530 results_info.SetString(
529 "queryInterval", 531 "queryInterval",
530 base::DateIntervalFormat(query_results_info->start_time, 532 base::DateIntervalFormat(query_results_info->start_time,
531 query_results_info->end_time, 533 query_results_info->end_time,
532 base::DATE_FORMAT_MONTH_WEEKDAY_DAY)); 534 base::DATE_FORMAT_MONTH_WEEKDAY_DAY));
533 535
534 web_ui()->CallJavascriptFunctionUnsafe("historyResult", results_info, 536 web_ui()->CallJavascriptFunctionUnsafe("historyResult", results_info,
(...skipping 12 matching lines...) Expand all
547 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); 549 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted");
548 } 550 }
549 551
550 void BrowsingHistoryHandler::HasOtherFormsOfBrowsingHistory( 552 void BrowsingHistoryHandler::HasOtherFormsOfBrowsingHistory(
551 bool has_other_forms, 553 bool has_other_forms,
552 bool has_synced_results) { 554 bool has_synced_results) {
553 web_ui()->CallJavascriptFunctionUnsafe( 555 web_ui()->CallJavascriptFunctionUnsafe(
554 "showNotification", base::FundamentalValue(has_synced_results), 556 "showNotification", base::FundamentalValue(has_synced_results),
555 base::FundamentalValue(has_other_forms)); 557 base::FundamentalValue(has_other_forms));
556 } 558 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/shared_vars.html ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698