| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/banners/app_banner_settings_helper.h" | 5 #include "chrome/browser/banners/app_banner_settings_helper.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <algorithm> | 9 #include <algorithm> |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 11 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 12 #include "chrome/browser/banners/app_banner_data_fetcher.h" | 14 #include "chrome/browser/banners/app_banner_data_fetcher.h" |
| 13 #include "chrome/browser/banners/app_banner_metrics.h" | 15 #include "chrome/browser/banners/app_banner_metrics.h" |
| 14 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 521 |
| 520 // Use truncating integer division here. | 522 // Use truncating integer division here. |
| 521 return time.LocalMidnight() + | 523 return time.LocalMidnight() + |
| 522 base::TimeDelta::FromMinutes((total_minutes / minutes) * minutes); | 524 base::TimeDelta::FromMinutes((total_minutes / minutes) * minutes); |
| 523 } | 525 } |
| 524 | 526 |
| 525 void AppBannerSettingsHelper::UpdateFromFieldTrial() { | 527 void AppBannerSettingsHelper::UpdateFromFieldTrial() { |
| 526 UpdateEngagementWeights(); | 528 UpdateEngagementWeights(); |
| 527 UpdateMinutesBetweenVisits(); | 529 UpdateMinutesBetweenVisits(); |
| 528 } | 530 } |
| OLD | NEW |