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

Side by Side Diff: chrome/browser/component_updater/component_updater_service.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 13 matching lines...) Expand all
24 #include "chrome/common/chrome_version_info.h" 24 #include "chrome/common/chrome_version_info.h"
25 #include "chrome/common/extensions/extension.h" 25 #include "chrome/common/extensions/extension.h"
26 #include "content/browser/utility_process_host.h" 26 #include "content/browser/utility_process_host.h"
27 #include "content/public/browser/notification_service.h" 27 #include "content/public/browser/notification_service.h"
28 #include "content/public/common/url_fetcher_delegate.h" 28 #include "content/public/common/url_fetcher_delegate.h"
29 #include "content/public/common/url_fetcher.h" 29 #include "content/public/common/url_fetcher.h"
30 #include "googleurl/src/gurl.h" 30 #include "googleurl/src/gurl.h"
31 #include "net/base/escape.h" 31 #include "net/base/escape.h"
32 #include "net/base/load_flags.h" 32 #include "net/base/load_flags.h"
33 33
34 using content::BrowserThread;
35
34 namespace { 36 namespace {
35 // Extends an omaha compatible update check url |query| string. Does 37 // Extends an omaha compatible update check url |query| string. Does
36 // not mutate the string if it would be longer than |limit| chars. 38 // not mutate the string if it would be longer than |limit| chars.
37 bool AddQueryString(std::string id, std::string version, 39 bool AddQueryString(std::string id, std::string version,
38 size_t limit, std::string* query) { 40 size_t limit, std::string* query) {
39 std::string additional = 41 std::string additional =
40 base::StringPrintf("id=%s&v=%s&uc", id.c_str(), version.c_str()); 42 base::StringPrintf("id=%s&v=%s&uc", id.c_str(), version.c_str());
41 additional = "x=" + net::EscapeQueryParamValue(additional, true); 43 additional = "x=" + net::EscapeQueryParamValue(additional, true);
42 if ((additional.size() + query->size() + 1) > limit) 44 if ((additional.size() + query->size() + 1) > limit)
43 return false; 45 return false;
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 ScheduleNextRun(false); 750 ScheduleNextRun(false);
749 } 751 }
750 752
751 // The component update factory. Using the component updater as a singleton 753 // The component update factory. Using the component updater as a singleton
752 // is the job of the browser process. 754 // is the job of the browser process.
753 ComponentUpdateService* ComponentUpdateServiceFactory( 755 ComponentUpdateService* ComponentUpdateServiceFactory(
754 ComponentUpdateService::Configurator* config) { 756 ComponentUpdateService::Configurator* config) {
755 DCHECK(config); 757 DCHECK(config);
756 return new CrxUpdateService(config); 758 return new CrxUpdateService(config);
757 } 759 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698