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

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

Issue 18006003: Consistently use notifications from component updater w/ on-demand PNaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 5 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 | Annotate | Revision Log
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 #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 <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 break; 977 break;
978 default: 978 default:
979 event = Configurator::kUnpackError; 979 event = Configurator::kUnpackError;
980 break; 980 break;
981 } 981 }
982 982
983 config_->OnEvent(event, CrxIdtoUMAId(component_id)); 983 config_->OnEvent(event, CrxIdtoUMAId(component_id));
984 ScheduleNextRun(false); 984 ScheduleNextRun(false);
985 } 985 }
986 986
987 bool ComponentUpdateService::IsUpdateNotificationForComponent(
988 const content::NotificationSource& src,
989 const CrxComponent& component) {
990 std::string id =
991 HexStringToID(StringToLowerASCII(base::HexEncode(&component.pk_hash[0],
992 component.pk_hash.size()/2)));
993 return content::Source<std::string>(src)->compare(id) == 0;
994 }
995
987 // The component update factory. Using the component updater as a singleton 996 // The component update factory. Using the component updater as a singleton
988 // is the job of the browser process. 997 // is the job of the browser process.
989 ComponentUpdateService* ComponentUpdateServiceFactory( 998 ComponentUpdateService* ComponentUpdateServiceFactory(
990 ComponentUpdateService::Configurator* config) { 999 ComponentUpdateService::Configurator* config) {
991 DCHECK(config); 1000 DCHECK(config);
992 return new CrxUpdateService(config); 1001 return new CrxUpdateService(config);
993 } 1002 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698