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 { | |
18 return 0; | |
19 } | |
Ken Rockot(use gerrit already)
2015/09/25 16:19:19
nit: missing vertical whitespace between all these
asargent_no_longer_on_chrome
2015/09/29 22:59:21
Done.
| |
20 int UpdateClientConfig::NextCheckDelay() const { | |
21 return 0; | |
22 } | |
23 int UpdateClientConfig::StepDelay() const { | |
24 return 1; | |
25 } | |
26 int UpdateClientConfig::OnDemandDelay() const { | |
27 return 1; | |
28 } | |
29 int UpdateClientConfig::UpdateDelay() const { | |
30 return 1; | |
31 } | |
32 | |
33 std::string UpdateClientConfig::GetOSLongName() const { | |
34 return version_info::GetOSType(); | |
35 } | |
36 | |
37 std::string UpdateClientConfig::ExtraRequestParams() const { | |
38 return std::string(); | |
39 } | |
40 | |
41 net::URLRequestContextGetter* UpdateClientConfig::RequestContext() const { | |
42 if (!context_) | |
43 return nullptr; | |
44 return context_->GetRequestContext(); | |
45 } | |
46 | |
47 scoped_refptr<update_client::OutOfProcessPatcher> | |
48 UpdateClientConfig::CreateOutOfProcessPatcher() const { | |
49 return nullptr; | |
50 } | |
51 | |
52 bool UpdateClientConfig::DeltasEnabled() const { | |
53 return true; | |
54 } | |
55 | |
56 bool UpdateClientConfig::UseBackgroundDownloader() const { | |
57 return false; | |
58 } | |
59 | |
60 scoped_refptr<base::SequencedTaskRunner> | |
61 UpdateClientConfig::GetSequencedTaskRunner() const { | |
62 return content::BrowserThread::GetBlockingPool() | |
63 ->GetSequencedTaskRunnerWithShutdownBehavior( | |
64 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), | |
65 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); | |
66 } | |
67 | |
68 scoped_refptr<base::SingleThreadTaskRunner> | |
69 UpdateClientConfig::GetSingleThreadTaskRunner() const { | |
70 return content::BrowserThread::GetMessageLoopProxyForThread( | |
71 content::BrowserThread::FILE); | |
72 } | |
73 | |
74 UpdateClientConfig::~UpdateClientConfig() {} | |
75 | |
76 } // namespace extensions | |
OLD | NEW |