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

Side by Side Diff: chrome/browser/extensions/extension_system_impl.cc

Issue 1362043005: Add extensions code to use common updater in components/update_client/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged latest origin/master Created 5 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/extension_system_impl.h" 5 #include "chrome/browser/extensions/extension_system_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/file_util.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "base/strings/string_tokenizer.h" 13 #include "base/strings/string_tokenizer.h"
13 #include "base/trace_event/trace_event.h" 14 #include "base/trace_event/trace_event.h"
14 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/extensions/chrome_app_sorting.h" 16 #include "chrome/browser/extensions/chrome_app_sorting.h"
16 #include "chrome/browser/extensions/chrome_content_verifier_delegate.h" 17 #include "chrome/browser/extensions/chrome_content_verifier_delegate.h"
17 #include "chrome/browser/extensions/component_loader.h" 18 #include "chrome/browser/extensions/component_loader.h"
18 #include "chrome/browser/extensions/extension_error_reporter.h" 19 #include "chrome/browser/extensions/extension_error_reporter.h"
19 #include "chrome/browser/extensions/extension_management.h" 20 #include "chrome/browser/extensions/extension_management.h"
20 #include "chrome/browser/extensions/extension_service.h" 21 #include "chrome/browser/extensions/extension_service.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 ContentVerifier* ExtensionSystemImpl::content_verifier() { 368 ContentVerifier* ExtensionSystemImpl::content_verifier() {
368 return shared_->content_verifier(); 369 return shared_->content_verifier();
369 } 370 }
370 371
371 scoped_ptr<ExtensionSet> ExtensionSystemImpl::GetDependentExtensions( 372 scoped_ptr<ExtensionSet> ExtensionSystemImpl::GetDependentExtensions(
372 const Extension* extension) { 373 const Extension* extension) {
373 return extension_service()->shared_module_service()->GetDependentExtensions( 374 return extension_service()->shared_module_service()->GetDependentExtensions(
374 extension); 375 extension);
375 } 376 }
376 377
378 void ExtensionSystemImpl::InstallUpdate(const std::string& extension_id,
379 const base::FilePath& temp_dir) {
380 NOTREACHED() << "Not yet implemented";
381 base::DeleteFile(temp_dir, true /* recursive */);
382 }
383
377 void ExtensionSystemImpl::RegisterExtensionWithRequestContexts( 384 void ExtensionSystemImpl::RegisterExtensionWithRequestContexts(
378 const Extension* extension, 385 const Extension* extension,
379 const base::Closure& callback) { 386 const base::Closure& callback) {
380 base::Time install_time; 387 base::Time install_time;
381 if (extension->location() != Manifest::COMPONENT) { 388 if (extension->location() != Manifest::COMPONENT) {
382 install_time = ExtensionPrefs::Get(profile_)-> 389 install_time = ExtensionPrefs::Get(profile_)->
383 GetInstallTime(extension->id()); 390 GetInstallTime(extension->id());
384 } 391 }
385 bool incognito_enabled = util::IsIncognitoEnabled(extension->id(), profile_); 392 bool incognito_enabled = util::IsIncognitoEnabled(extension->id(), profile_);
386 393
(...skipping 20 matching lines...) Expand all
407 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 414 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
408 const std::string& extension_id, 415 const std::string& extension_id,
409 const UnloadedExtensionInfo::Reason reason) { 416 const UnloadedExtensionInfo::Reason reason) {
410 BrowserThread::PostTask( 417 BrowserThread::PostTask(
411 BrowserThread::IO, 418 BrowserThread::IO,
412 FROM_HERE, 419 FROM_HERE,
413 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 420 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
414 } 421 }
415 422
416 } // namespace extensions 423 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system_impl.h ('k') | chrome/browser/extensions/test_extension_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698