| OLD | NEW |
| 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 "chrome/browser/android/offline_pages/background_loader_offliner.h" | 5 #include "chrome/browser/offline_pages/background_loader_offliner.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
| 11 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h" | 13 #include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h" |
| 14 #include "chrome/browser/android/offline_pages/offliner_helper.h" | 14 #include "chrome/browser/android/offline_pages/offliner_helper.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 // Given the choice between int and double, we choose to implicitly convert to | 489 // Given the choice between int and double, we choose to implicitly convert to |
| 490 // a double since it maintains more precision (we can get a longer time in | 490 // a double since it maintains more precision (we can get a longer time in |
| 491 // milliseconds than we can with a 2 bit int, 53 bits vs 32). | 491 // milliseconds than we can with a 2 bit int, 53 bits vs 32). |
| 492 double delay = delay_so_far.InMilliseconds(); | 492 double delay = delay_so_far.InMilliseconds(); |
| 493 signal_data_.SetDouble(signal_name, delay); | 493 signal_data_.SetDouble(signal_name, delay); |
| 494 } | 494 } |
| 495 | 495 |
| 496 } // namespace offline_pages | 496 } // namespace offline_pages |
| 497 | 497 |
| 498 DEFINE_WEB_CONTENTS_USER_DATA_KEY(offline_pages::OfflinerData); | 498 DEFINE_WEB_CONTENTS_USER_DATA_KEY(offline_pages::OfflinerData); |
| OLD | NEW |