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

Unified Diff: chrome/browser/ui/webui/browsing_history_handler.cc

Issue 2111103002: Make callers of FromUTC(Local)Exploded in chrome/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lei Zhang's comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/browsing_history_handler.cc
diff --git a/chrome/browser/ui/webui/browsing_history_handler.cc b/chrome/browser/ui/webui/browsing_history_handler.cc
index 82fd5d3d41b5df437572e4ce61b1bb57ee526ea2..338e1a6c6080a9d4988a6f94313e8f60801ad19e 100644
--- a/chrome/browser/ui/webui/browsing_history_handler.cc
+++ b/chrome/browser/ui/webui/browsing_history_handler.cc
@@ -905,7 +905,10 @@ void BrowsingHistoryHandler::SetQueryTimeInMonths(
exploded.day_of_month = 1;
if (offset == 0) {
- options->begin_time = base::Time::FromLocalExploded(exploded);
+ if (!base::Time::FromLocalExploded(exploded, &options->begin_time)) {
+ // TODO(maksims): implement errors handling here.
+ NOTIMPLEMENTED();
+ }
// Set the end time of this first search to null (which will
// show results from the future, should the user's clock have
@@ -919,12 +922,18 @@ void BrowsingHistoryHandler::SetQueryTimeInMonths(
exploded.month -= offset - 1;
// Set the correct year.
NormalizeMonths(&exploded);
- options->end_time = base::Time::FromLocalExploded(exploded);
+ if (!base::Time::FromLocalExploded(exploded, &options->begin_time)) {
+ // TODO(maksims): implement errors handling here.
+ NOTIMPLEMENTED();
+ }
exploded.month -= 1;
// Set the correct year
NormalizeMonths(&exploded);
- options->begin_time = base::Time::FromLocalExploded(exploded);
+ if (!base::Time::FromLocalExploded(exploded, &options->begin_time)) {
+ // TODO(maksims): implement errors handling here.
+ NOTIMPLEMENTED();
+ }
}
}
« no previous file with comments | « chrome/browser/password_manager/password_store_mac.cc ('k') | chrome/browser/ui/webui/media/webrtc_logs_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698