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 */); |
280 } | 281 } |
281 } | 282 } |
282 } | 283 } |
283 } | 284 } |
284 | 285 |
285 void ExtensionSystemImpl::Shared::Shutdown() { | 286 void ExtensionSystemImpl::Shared::Shutdown() { |
286 if (content_verifier_.get()) | 287 if (content_verifier_.get()) |
287 content_verifier_->Shutdown(); | 288 content_verifier_->Shutdown(); |
288 if (extension_service_) | 289 if (extension_service_) |
289 extension_service_->Shutdown(); | 290 extension_service_->Shutdown(); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 467 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
467 const std::string& extension_id, | 468 const std::string& extension_id, |
468 const UnloadedExtensionInfo::Reason reason) { | 469 const UnloadedExtensionInfo::Reason reason) { |
469 BrowserThread::PostTask( | 470 BrowserThread::PostTask( |
470 BrowserThread::IO, | 471 BrowserThread::IO, |
471 FROM_HERE, | 472 FROM_HERE, |
472 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); | 473 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); |
473 } | 474 } |
474 | 475 |
475 } // namespace extensions | 476 } // namespace extensions |
OLD | NEW |