OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "extensions/browser/updater/update_client_config.h" | |
6 | |
7 #include "components/update_client/component_patcher_operation.h" | |
8 #include "components/version_info/version_info.h" | |
9 #include "content/public/browser/browser_context.h" | |
10 #include "content/public/browser/browser_thread.h" | |
11 | |
12 namespace extensions { | |
13 | |
14 UpdateClientConfig::UpdateClientConfig(content::BrowserContext* context) | |
15 : context_(context) {} | |
16 | |
17 int UpdateClientConfig::InitialDelay() const { | |
Sorin Jianu
2015/10/02 00:05:10
Are the timing values for these functions correct?
asargent_no_longer_on_chrome
2015/10/06 21:31:17
Maybe? In my manual tests so far they seem to have
Sorin Jianu
2015/10/08 22:57:54
If this is the case, then InitialDelay and NextChe
asargent_no_longer_on_chrome
2015/10/14 17:04:31
Ok, I rewrote things to use a ConfiguratorImpl for
Sorin Jianu
2015/10/14 20:37:09
Acknowledged.
| |
18 return 0; | |
19 } | |
20 | |
21 int UpdateClientConfig::NextCheckDelay() const { | |
22 return 0; | |
23 } | |
24 | |
25 int UpdateClientConfig::StepDelay() const { | |
26 return 1; | |
27 } | |
28 | |
29 int UpdateClientConfig::OnDemandDelay() const { | |
30 return 1; | |
31 } | |
32 | |
33 int UpdateClientConfig::UpdateDelay() const { | |
34 return 1; | |
35 } | |
36 | |
37 std::string UpdateClientConfig::GetOSLongName() const { | |
38 return version_info::GetOSType(); | |
39 } | |
40 | |
41 std::string UpdateClientConfig::ExtraRequestParams() const { | |
42 return std::string(); | |
43 } | |
44 | |
45 net::URLRequestContextGetter* UpdateClientConfig::RequestContext() const { | |
46 if (!context_) | |
47 return nullptr; | |
48 return context_->GetRequestContext(); | |
49 } | |
50 | |
51 scoped_refptr<update_client::OutOfProcessPatcher> | |
52 UpdateClientConfig::CreateOutOfProcessPatcher() const { | |
53 return nullptr; | |
54 } | |
55 | |
56 bool UpdateClientConfig::DeltasEnabled() const { | |
57 return true; | |
58 } | |
59 | |
60 bool UpdateClientConfig::UseBackgroundDownloader() const { | |
61 return false; | |
62 } | |
63 | |
64 scoped_refptr<base::SequencedTaskRunner> | |
65 UpdateClientConfig::GetSequencedTaskRunner() const { | |
66 return content::BrowserThread::GetBlockingPool() | |
67 ->GetSequencedTaskRunnerWithShutdownBehavior( | |
68 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), | |
69 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); | |
70 } | |
71 | |
72 scoped_refptr<base::SingleThreadTaskRunner> | |
73 UpdateClientConfig::GetSingleThreadTaskRunner() const { | |
74 return content::BrowserThread::GetMessageLoopProxyForThread( | |
75 content::BrowserThread::FILE); | |
76 } | |
77 | |
78 UpdateClientConfig::~UpdateClientConfig() {} | |
79 | |
80 } // namespace extensions | |
OLD | NEW |