Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: components/update_client/update_engine.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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/update_client/update_engine.h" 5 #include "components/update_client/update_engine.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 26 matching lines...) Expand all
37 notify_observers_callback(notify_observers_callback), 37 notify_observers_callback(notify_observers_callback),
38 callback(callback), 38 callback(callback),
39 main_task_runner(base::ThreadTaskRunnerHandle::Get()), 39 main_task_runner(base::ThreadTaskRunnerHandle::Get()),
40 blocking_task_runner(config->GetSequencedTaskRunner()), 40 blocking_task_runner(config->GetSequencedTaskRunner()),
41 update_checker_factory(update_checker_factory), 41 update_checker_factory(update_checker_factory),
42 crx_downloader_factory(crx_downloader_factory), 42 crx_downloader_factory(crx_downloader_factory),
43 ping_manager(ping_manager), 43 ping_manager(ping_manager),
44 retry_after_sec_(0) {} 44 retry_after_sec_(0) {}
45 45
46 UpdateContext::~UpdateContext() { 46 UpdateContext::~UpdateContext() {
47 STLDeleteElements(&update_items); 47 base::STLDeleteElements(&update_items);
48 } 48 }
49 49
50 UpdateEngine::UpdateEngine( 50 UpdateEngine::UpdateEngine(
51 const scoped_refptr<Configurator>& config, 51 const scoped_refptr<Configurator>& config,
52 UpdateChecker::Factory update_checker_factory, 52 UpdateChecker::Factory update_checker_factory,
53 CrxDownloader::Factory crx_downloader_factory, 53 CrxDownloader::Factory crx_downloader_factory,
54 PingManager* ping_manager, 54 PingManager* ping_manager,
55 const NotifyObserversCallback& notify_observers_callback) 55 const NotifyObserversCallback& notify_observers_callback)
56 : config_(config), 56 : config_(config),
57 update_checker_factory_(update_checker_factory), 57 update_checker_factory_(update_checker_factory),
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 const auto now(base::Time::Now()); 146 const auto now(base::Time::Now());
147 147
148 // Throttle the calls in the interval (t - 1 day, t) to limit the effect of 148 // Throttle the calls in the interval (t - 1 day, t) to limit the effect of
149 // unset clocks or clock drift. 149 // unset clocks or clock drift.
150 return throttle_updates_until_ - base::TimeDelta::FromDays(1) < now && 150 return throttle_updates_until_ - base::TimeDelta::FromDays(1) < now &&
151 now < throttle_updates_until_; 151 now < throttle_updates_until_;
152 } 152 }
153 153
154 } // namespace update_client 154 } // namespace update_client
OLDNEW
« no previous file with comments | « components/syncable_prefs/pref_model_associator.cc ('k') | components/url_matcher/regex_set_matcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698