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

Unified Diff: components/update_client/update_engine.cc

Issue 1861383004: Add module for counting date-last-roll-call and persisting those counts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another test fix. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/update_client/update_engine.h ('k') | components/update_client/update_response.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/update_engine.cc
diff --git a/components/update_client/update_engine.cc b/components/update_client/update_engine.cc
index 20f9a6acf1e28f30be484fe7548aff4527dc37f9..87cbda2be9ba1ec5c3d166adaa9214dc18be9414 100644
--- a/components/update_client/update_engine.cc
+++ b/components/update_client/update_engine.cc
@@ -10,9 +10,11 @@
#include "base/stl_util.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
+#include "components/prefs/pref_service.h"
#include "components/update_client/action_update_check.h"
#include "components/update_client/configurator.h"
#include "components/update_client/crx_update_item.h"
+#include "components/update_client/persisted_data.h"
#include "components/update_client/update_checker.h"
namespace update_client {
@@ -54,8 +56,8 @@ UpdateEngine::UpdateEngine(
update_checker_factory_(update_checker_factory),
crx_downloader_factory_(crx_downloader_factory),
ping_manager_(ping_manager),
- notify_observers_callback_(notify_observers_callback) {
-}
+ metadata_(new PersistedData(config->GetPrefService())),
+ notify_observers_callback_(notify_observers_callback) {}
UpdateEngine::~UpdateEngine() {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -98,7 +100,7 @@ void UpdateEngine::Update(
CrxUpdateItem update_item;
scoped_ptr<ActionUpdateCheck> update_check_action(new ActionUpdateCheck(
- (*update_context->update_checker_factory)(config_),
+ (*update_context->update_checker_factory)(config_, *metadata_),
config_->GetBrowserVersion(), config_->ExtraRequestParams()));
update_context->current_action.reset(update_check_action.release());
« no previous file with comments | « components/update_client/update_engine.h ('k') | components/update_client/update_response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698