OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/version.h" | 6 #include "base/version.h" |
7 #include "chrome/browser/component_updater/component_patcher_operation_out_of_pr
ocess.h" | 7 #include "chrome/browser/component_updater/component_patcher_operation_out_of_pr
ocess.h" |
8 #include "chrome/browser/extensions/updater/chrome_update_client_config.h" | 8 #include "chrome/browser/extensions/updater/chrome_update_client_config.h" |
9 #include "chrome/browser/google/google_brand.h" | 9 #include "chrome/browser/google/google_brand.h" |
10 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" | 10 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" |
11 #include "chrome/common/channel_info.h" | 11 #include "chrome/common/channel_info.h" |
12 #include "components/prefs/pref_service.h" | 12 #include "components/prefs/pref_service.h" |
| 13 #include "components/update_client/update_query_params.h" |
13 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
14 #include "content/public/browser/storage_partition.h" | 15 #include "content/public/browser/storage_partition.h" |
15 | 16 |
16 namespace extensions { | 17 namespace extensions { |
17 | 18 |
18 // For privacy reasons, requires encryption of the component updater | 19 // For privacy reasons, requires encryption of the component updater |
19 // communication with the update backend. | 20 // communication with the update backend. |
20 ChromeUpdateClientConfig::ChromeUpdateClientConfig( | 21 ChromeUpdateClientConfig::ChromeUpdateClientConfig( |
21 content::BrowserContext* context) | 22 content::BrowserContext* context) |
22 : impl_(base::CommandLine::ForCurrentProcess(), | 23 : impl_(base::CommandLine::ForCurrentProcess(), |
(...skipping 22 matching lines...) Expand all Loading... |
45 } | 46 } |
46 | 47 |
47 std::vector<GURL> ChromeUpdateClientConfig::UpdateUrl() const { | 48 std::vector<GURL> ChromeUpdateClientConfig::UpdateUrl() const { |
48 return impl_.UpdateUrl(); | 49 return impl_.UpdateUrl(); |
49 } | 50 } |
50 | 51 |
51 std::vector<GURL> ChromeUpdateClientConfig::PingUrl() const { | 52 std::vector<GURL> ChromeUpdateClientConfig::PingUrl() const { |
52 return impl_.PingUrl(); | 53 return impl_.PingUrl(); |
53 } | 54 } |
54 | 55 |
| 56 std::string ChromeUpdateClientConfig::GetProdId() const { |
| 57 return update_client::UpdateQueryParams::GetProdIdString( |
| 58 update_client::UpdateQueryParams::ProdId::CRX); |
| 59 } |
| 60 |
55 base::Version ChromeUpdateClientConfig::GetBrowserVersion() const { | 61 base::Version ChromeUpdateClientConfig::GetBrowserVersion() const { |
56 return impl_.GetBrowserVersion(); | 62 return impl_.GetBrowserVersion(); |
57 } | 63 } |
58 | 64 |
59 std::string ChromeUpdateClientConfig::GetChannel() const { | 65 std::string ChromeUpdateClientConfig::GetChannel() const { |
60 return chrome::GetChannelString(); | 66 return chrome::GetChannelString(); |
61 } | 67 } |
62 | 68 |
63 std::string ChromeUpdateClientConfig::GetBrand() const { | 69 std::string ChromeUpdateClientConfig::GetBrand() const { |
64 std::string brand; | 70 std::string brand; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 return impl_.EnabledCupSigning(); | 113 return impl_.EnabledCupSigning(); |
108 } | 114 } |
109 | 115 |
110 PrefService* ChromeUpdateClientConfig::GetPrefService() const { | 116 PrefService* ChromeUpdateClientConfig::GetPrefService() const { |
111 return nullptr; | 117 return nullptr; |
112 } | 118 } |
113 | 119 |
114 ChromeUpdateClientConfig::~ChromeUpdateClientConfig() {} | 120 ChromeUpdateClientConfig::~ChromeUpdateClientConfig() {} |
115 | 121 |
116 } // namespace extensions | 122 } // namespace extensions |
OLD | NEW |