OLD | NEW |
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 #include "chrome/browser/component_updater/component_updater_service.h" | 5 #include "chrome/browser/component_updater/component_updater_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "content/public/browser/utility_process_host_client.h" | 30 #include "content/public/browser/utility_process_host_client.h" |
31 #include "content/public/common/url_fetcher.h" | 31 #include "content/public/common/url_fetcher.h" |
32 #include "content/public/common/url_fetcher_delegate.h" | 32 #include "content/public/common/url_fetcher_delegate.h" |
33 #include "googleurl/src/gurl.h" | 33 #include "googleurl/src/gurl.h" |
34 #include "net/base/escape.h" | 34 #include "net/base/escape.h" |
35 #include "net/base/load_flags.h" | 35 #include "net/base/load_flags.h" |
36 | 36 |
37 using content::BrowserThread; | 37 using content::BrowserThread; |
38 using content::UtilityProcessHost; | 38 using content::UtilityProcessHost; |
39 using content::UtilityProcessHostClient; | 39 using content::UtilityProcessHostClient; |
| 40 using extensions::Extension; |
40 | 41 |
41 // The component updater is designed to live until process shutdown, so | 42 // The component updater is designed to live until process shutdown, so |
42 // base::Bind() calls are not refcounted. | 43 // base::Bind() calls are not refcounted. |
43 | 44 |
44 namespace { | 45 namespace { |
45 // Extends an omaha compatible update check url |query| string. Does | 46 // Extends an omaha compatible update check url |query| string. Does |
46 // not mutate the string if it would be longer than |limit| chars. | 47 // not mutate the string if it would be longer than |limit| chars. |
47 bool AddQueryString(const std::string& id, | 48 bool AddQueryString(const std::string& id, |
48 const std::string& version, | 49 const std::string& version, |
49 size_t limit, | 50 size_t limit, |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 ScheduleNextRun(false); | 769 ScheduleNextRun(false); |
769 } | 770 } |
770 | 771 |
771 // The component update factory. Using the component updater as a singleton | 772 // The component update factory. Using the component updater as a singleton |
772 // is the job of the browser process. | 773 // is the job of the browser process. |
773 ComponentUpdateService* ComponentUpdateServiceFactory( | 774 ComponentUpdateService* ComponentUpdateServiceFactory( |
774 ComponentUpdateService::Configurator* config) { | 775 ComponentUpdateService::Configurator* config) { |
775 DCHECK(config); | 776 DCHECK(config); |
776 return new CrxUpdateService(config); | 777 return new CrxUpdateService(config); |
777 } | 778 } |
OLD | NEW |