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