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

Side by Side Diff: extensions/browser/updater/extension_downloader.h

Issue 1956893004: Don't send extension info for non-webstore extensions during update check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittests Created 4 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ 5 #ifndef EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_
6 #define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ 6 #define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 void set_manifest_query_params(const std::string& params) { 107 void set_manifest_query_params(const std::string& params) {
108 manifest_query_params_ = params; 108 manifest_query_params_ = params;
109 } 109 }
110 110
111 void set_ping_enabled_domain(const std::string& domain) { 111 void set_ping_enabled_domain(const std::string& domain) {
112 ping_enabled_domain_ = domain; 112 ping_enabled_domain_ = domain;
113 } 113 }
114 114
115 void set_enable_extra_update_metrics(bool enable) {
116 enable_extra_update_metrics_ = enable;
117 }
118
119 // Sets a test delegate to use by any instances of this class. The |delegate| 115 // Sets a test delegate to use by any instances of this class. The |delegate|
120 // should outlive all instances. 116 // should outlive all instances.
121 static void set_test_delegate(ExtensionDownloaderTestDelegate* delegate); 117 static void set_test_delegate(ExtensionDownloaderTestDelegate* delegate);
122 118
123 // These are needed for unit testing, to help identify the correct mock 119 // These are needed for unit testing, to help identify the correct mock
124 // URLFetcher objects. 120 // URLFetcher objects.
125 static const int kManifestFetcherId = 1; 121 static const int kManifestFetcherId = 1;
126 static const int kExtensionFetcherId = 2; 122 static const int kExtensionFetcherId = 2;
127 123
128 // Update AppID for extension blacklist. 124 // Update AppID for extension blacklist.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // Brand code to include with manifest fetch queries if sending ping data. 319 // Brand code to include with manifest fetch queries if sending ping data.
324 std::string brand_code_; 320 std::string brand_code_;
325 321
326 // Baseline parameters to include with manifest fetch queries. 322 // Baseline parameters to include with manifest fetch queries.
327 std::string manifest_query_params_; 323 std::string manifest_query_params_;
328 324
329 // Domain to enable ping data. Ping data will be sent with manifest fetches 325 // Domain to enable ping data. Ping data will be sent with manifest fetches
330 // to update URLs which match this domain. Defaults to empty (no domain). 326 // to update URLs which match this domain. Defaults to empty (no domain).
331 std::string ping_enabled_domain_; 327 std::string ping_enabled_domain_;
332 328
333 // Indicates whether or not extra metrics should be included with ping data.
334 // Defaults to |false|.
335 bool enable_extra_update_metrics_;
336
337 // Used to create WeakPtrs to |this|. 329 // Used to create WeakPtrs to |this|.
338 base::WeakPtrFactory<ExtensionDownloader> weak_ptr_factory_; 330 base::WeakPtrFactory<ExtensionDownloader> weak_ptr_factory_;
339 331
340 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloader); 332 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloader);
341 }; 333 };
342 334
343 } // namespace extensions 335 } // namespace extensions
344 336
345 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ 337 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_accessor.h ('k') | extensions/browser/updater/extension_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698