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

Side by Side Diff: extensions/browser/updater/update_service.cc

Issue 2259383002: Consistently use namespaced base::Version in extensions code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/updater/update_service.h" 5 #include "extensions/browser/updater/update_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "components/update_client/update_client.h" 9 #include "components/update_client/update_client.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 25 matching lines...) Expand all
36 void UpdateService::Shutdown() { 36 void UpdateService::Shutdown() {
37 if (update_data_provider_) { 37 if (update_data_provider_) {
38 update_data_provider_->Shutdown(); 38 update_data_provider_->Shutdown();
39 update_data_provider_ = nullptr; 39 update_data_provider_ = nullptr;
40 } 40 }
41 update_client_ = nullptr; 41 update_client_ = nullptr;
42 context_ = nullptr; 42 context_ = nullptr;
43 } 43 }
44 44
45 void UpdateService::SendUninstallPing(const std::string& id, 45 void UpdateService::SendUninstallPing(const std::string& id,
46 const Version& version, 46 const base::Version& version,
47 int reason) { 47 int reason) {
48 update_client_->SendUninstallPing(id, version, reason); 48 update_client_->SendUninstallPing(id, version, reason);
49 } 49 }
50 50
51 void UpdateService::StartUpdateCheck( 51 void UpdateService::StartUpdateCheck(
52 const std::vector<std::string>& extension_ids) { 52 const std::vector<std::string>& extension_ids) {
53 if (!update_client_) 53 if (!update_client_)
54 return; 54 return;
55 update_client_->Update(extension_ids, base::Bind(&UpdateDataProvider::GetData, 55 update_client_->Update(extension_ids, base::Bind(&UpdateDataProvider::GetData,
56 update_data_provider_), 56 update_data_provider_),
57 base::Bind(&UpdateCheckCompleteCallback)); 57 base::Bind(&UpdateCheckCompleteCallback));
58 } 58 }
59 59
60 UpdateService::UpdateService( 60 UpdateService::UpdateService(
61 content::BrowserContext* context, 61 content::BrowserContext* context,
62 scoped_refptr<update_client::UpdateClient> update_client) 62 scoped_refptr<update_client::UpdateClient> update_client)
63 : context_(context), update_client_(update_client) { 63 : context_(context), update_client_(update_client) {
64 CHECK(update_client_); 64 CHECK(update_client_);
65 update_data_provider_ = 65 update_data_provider_ =
66 new UpdateDataProvider(context_, base::Bind(&InstallUpdateCallback)); 66 new UpdateDataProvider(context_, base::Bind(&InstallUpdateCallback));
67 } 67 }
68 68
69 UpdateService::~UpdateService() {} 69 UpdateService::~UpdateService() {}
70 70
71 } // namespace extensions 71 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/updater/extension_downloader.cc ('k') | extensions/browser/updater/update_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698