Chromium Code Reviews| Index: extensions/browser/updater/update_client_config.cc |
| diff --git a/extensions/browser/updater/update_client_config.cc b/extensions/browser/updater/update_client_config.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2630a6ac8dd191e08b77a6ea84b7aa6c3205dfec |
| --- /dev/null |
| +++ b/extensions/browser/updater/update_client_config.cc |
| @@ -0,0 +1,80 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "extensions/browser/updater/update_client_config.h" |
| + |
| +#include "components/update_client/component_patcher_operation.h" |
| +#include "components/version_info/version_info.h" |
| +#include "content/public/browser/browser_context.h" |
| +#include "content/public/browser/browser_thread.h" |
| + |
| +namespace extensions { |
| + |
| +UpdateClientConfig::UpdateClientConfig(content::BrowserContext* context) |
| + : context_(context) {} |
| + |
| +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.
|
| + return 0; |
| +} |
| + |
| +int UpdateClientConfig::NextCheckDelay() const { |
| + return 0; |
| +} |
| + |
| +int UpdateClientConfig::StepDelay() const { |
| + return 1; |
| +} |
| + |
| +int UpdateClientConfig::OnDemandDelay() const { |
| + return 1; |
| +} |
| + |
| +int UpdateClientConfig::UpdateDelay() const { |
| + return 1; |
| +} |
| + |
| +std::string UpdateClientConfig::GetOSLongName() const { |
| + return version_info::GetOSType(); |
| +} |
| + |
| +std::string UpdateClientConfig::ExtraRequestParams() const { |
| + return std::string(); |
| +} |
| + |
| +net::URLRequestContextGetter* UpdateClientConfig::RequestContext() const { |
| + if (!context_) |
| + return nullptr; |
| + return context_->GetRequestContext(); |
| +} |
| + |
| +scoped_refptr<update_client::OutOfProcessPatcher> |
| +UpdateClientConfig::CreateOutOfProcessPatcher() const { |
| + return nullptr; |
| +} |
| + |
| +bool UpdateClientConfig::DeltasEnabled() const { |
| + return true; |
| +} |
| + |
| +bool UpdateClientConfig::UseBackgroundDownloader() const { |
| + return false; |
| +} |
| + |
| +scoped_refptr<base::SequencedTaskRunner> |
| +UpdateClientConfig::GetSequencedTaskRunner() const { |
| + return content::BrowserThread::GetBlockingPool() |
| + ->GetSequencedTaskRunnerWithShutdownBehavior( |
| + content::BrowserThread::GetBlockingPool()->GetSequenceToken(), |
| + base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
| +} |
| + |
| +scoped_refptr<base::SingleThreadTaskRunner> |
| +UpdateClientConfig::GetSingleThreadTaskRunner() const { |
| + return content::BrowserThread::GetMessageLoopProxyForThread( |
| + content::BrowserThread::FILE); |
| +} |
| + |
| +UpdateClientConfig::~UpdateClientConfig() {} |
| + |
| +} // namespace extensions |