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

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

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 // the files created. 922 // the files created.
923 void CrxUpdateService::Install(const CRXContext* context, 923 void CrxUpdateService::Install(const CRXContext* context,
924 const base::FilePath& crx_path) { 924 const base::FilePath& crx_path) {
925 // This function owns the |crx_path| and the |context| object. 925 // This function owns the |crx_path| and the |context| object.
926 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 926 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
927 ComponentUnpacker unpacker(context->pk_hash, 927 ComponentUnpacker unpacker(context->pk_hash,
928 crx_path, 928 crx_path,
929 context->fingerprint, 929 context->fingerprint,
930 component_patcher_.get(), 930 component_patcher_.get(),
931 context->installer); 931 context->installer);
932 if (!file_util::Delete(crx_path, false)) 932 if (!base::Delete(crx_path, false))
933 NOTREACHED() << crx_path.value(); 933 NOTREACHED() << crx_path.value();
934 // Why unretained? See comment at top of file. 934 // Why unretained? See comment at top of file.
935 BrowserThread::PostDelayedTask( 935 BrowserThread::PostDelayedTask(
936 BrowserThread::UI, 936 BrowserThread::UI,
937 FROM_HERE, 937 FROM_HERE,
938 base::Bind(&CrxUpdateService::DoneInstalling, base::Unretained(this), 938 base::Bind(&CrxUpdateService::DoneInstalling, base::Unretained(this),
939 context->id, unpacker.error(), unpacker.extended_error()), 939 context->id, unpacker.error(), unpacker.extended_error()),
940 base::TimeDelta::FromMilliseconds(config_->StepDelay())); 940 base::TimeDelta::FromMilliseconds(config_->StepDelay()));
941 delete context; 941 delete context;
942 } 942 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 ScheduleNextRun(false); 984 ScheduleNextRun(false);
985 } 985 }
986 986
987 // The component update factory. Using the component updater as a singleton 987 // The component update factory. Using the component updater as a singleton
988 // is the job of the browser process. 988 // is the job of the browser process.
989 ComponentUpdateService* ComponentUpdateServiceFactory( 989 ComponentUpdateService* ComponentUpdateServiceFactory(
990 ComponentUpdateService::Configurator* config) { 990 ComponentUpdateService::Configurator* config) {
991 DCHECK(config); 991 DCHECK(config);
992 return new CrxUpdateService(config); 992 return new CrxUpdateService(config);
993 } 993 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698