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 "components/quirks/quirks_manager.h" | 5 #include "components/quirks/quirks_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "base/task_runner_util.h" | 14 #include "base/task_runner_util.h" |
15 #include "base/threading/sequenced_worker_pool.h" | |
16 #include "components/prefs/pref_registry_simple.h" | 15 #include "components/prefs/pref_registry_simple.h" |
17 #include "components/prefs/scoped_user_pref_update.h" | 16 #include "components/prefs/scoped_user_pref_update.h" |
18 #include "components/quirks/pref_names.h" | 17 #include "components/quirks/pref_names.h" |
19 #include "components/quirks/quirks_client.h" | 18 #include "components/quirks/quirks_client.h" |
20 #include "net/url_request/url_fetcher.h" | 19 #include "net/url_request/url_fetcher.h" |
21 #include "net/url_request/url_request_context_getter.h" | 20 #include "net/url_request/url_request_context_getter.h" |
22 #include "url/gurl.h" | 21 #include "url/gurl.h" |
23 | 22 |
24 namespace quirks { | 23 namespace quirks { |
25 | 24 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 207 } |
209 | 208 |
210 void QuirksManager::SetLastServerCheck(int64_t product_id, | 209 void QuirksManager::SetLastServerCheck(int64_t product_id, |
211 const base::Time& last_check) { | 210 const base::Time& last_check) { |
212 DCHECK(thread_checker_.CalledOnValidThread()); | 211 DCHECK(thread_checker_.CalledOnValidThread()); |
213 DictionaryPrefUpdate dict(local_state_, prefs::kQuirksClientLastServerCheck); | 212 DictionaryPrefUpdate dict(local_state_, prefs::kQuirksClientLastServerCheck); |
214 dict->SetDouble(IdToHexString(product_id), last_check.ToDoubleT()); | 213 dict->SetDouble(IdToHexString(product_id), last_check.ToDoubleT()); |
215 } | 214 } |
216 | 215 |
217 } // namespace quirks | 216 } // namespace quirks |
OLD | NEW |