OLD | NEW |
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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // TODO(yoz): Seems like this should move into ExtensionService::Init. | 268 // TODO(yoz): Seems like this should move into ExtensionService::Init. |
269 // But maybe it's no longer important. | 269 // But maybe it's no longer important. |
270 if (command_line->HasSwitch(switches::kLoadExtension)) { | 270 if (command_line->HasSwitch(switches::kLoadExtension)) { |
271 base::CommandLine::StringType path_list = | 271 base::CommandLine::StringType path_list = |
272 command_line->GetSwitchValueNative(switches::kLoadExtension); | 272 command_line->GetSwitchValueNative(switches::kLoadExtension); |
273 base::StringTokenizerT<base::CommandLine::StringType, | 273 base::StringTokenizerT<base::CommandLine::StringType, |
274 base::CommandLine::StringType::const_iterator> | 274 base::CommandLine::StringType::const_iterator> |
275 t(path_list, FILE_PATH_LITERAL(",")); | 275 t(path_list, FILE_PATH_LITERAL(",")); |
276 while (t.GetNext()) { | 276 while (t.GetNext()) { |
277 std::string extension_id; | 277 std::string extension_id; |
278 UnpackedInstaller::Create(extension_service_.get()) | 278 UnpackedInstaller::Create(extension_service_.get())-> |
279 ->LoadFromCommandLine(base::FilePath(t.token()), &extension_id, | 279 LoadFromCommandLine(base::FilePath(t.token()), &extension_id); |
280 false /* only_allow_apps */); | |
281 } | 280 } |
282 } | 281 } |
283 } | 282 } |
284 } | 283 } |
285 | 284 |
286 void ExtensionSystemImpl::Shared::Shutdown() { | 285 void ExtensionSystemImpl::Shared::Shutdown() { |
287 if (content_verifier_.get()) | 286 if (content_verifier_.get()) |
288 content_verifier_->Shutdown(); | 287 content_verifier_->Shutdown(); |
289 if (extension_service_) | 288 if (extension_service_) |
290 extension_service_->Shutdown(); | 289 extension_service_->Shutdown(); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 466 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
468 const std::string& extension_id, | 467 const std::string& extension_id, |
469 const UnloadedExtensionInfo::Reason reason) { | 468 const UnloadedExtensionInfo::Reason reason) { |
470 BrowserThread::PostTask( | 469 BrowserThread::PostTask( |
471 BrowserThread::IO, | 470 BrowserThread::IO, |
472 FROM_HERE, | 471 FROM_HERE, |
473 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); | 472 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); |
474 } | 473 } |
475 | 474 |
476 } // namespace extensions | 475 } // namespace extensions |
OLD | NEW |