OLD | NEW |
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/extensions/extension_system.h" | 5 #include "chrome/browser/extensions/extension_system.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/string_tokenizer.h" | 10 #include "base/string_tokenizer.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 FILE_PATH_LITERAL(",")); | 145 FILE_PATH_LITERAL(",")); |
146 scoped_refptr<extensions::UnpackedInstaller> installer = | 146 scoped_refptr<extensions::UnpackedInstaller> installer = |
147 extensions::UnpackedInstaller::Create(extension_service_.get()); | 147 extensions::UnpackedInstaller::Create(extension_service_.get()); |
148 while (t.GetNext()) { | 148 while (t.GetNext()) { |
149 installer->LoadFromCommandLine(FilePath(t.token())); | 149 installer->LoadFromCommandLine(FilePath(t.token())); |
150 } | 150 } |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 // Make the chrome://extension-icon/ resource available. | 154 // Make the chrome://extension-icon/ resource available. |
155 profile_->GetChromeURLDataManager()->AddDataSource( | 155 ChromeURLDataManager::AddDataSource(profile_, |
156 new ExtensionIconSource(profile_)); | 156 new ExtensionIconSource(profile_)); |
157 | 157 |
158 // Initialize extension event routers. Note that on Chrome OS, this will | 158 // Initialize extension event routers. Note that on Chrome OS, this will |
159 // not succeed if the user has not logged in yet, in which case the | 159 // not succeed if the user has not logged in yet, in which case the |
160 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead. | 160 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead. |
161 // The InitEventRouters call used to be in BrowserMain, because when bookmark | 161 // The InitEventRouters call used to be in BrowserMain, because when bookmark |
162 // import happened on first run, the bookmark bar was not being correctly | 162 // import happened on first run, the bookmark bar was not being correctly |
163 // initialized (see issue 40144). Now that bookmarks aren't imported and | 163 // initialized (see issue 40144). Now that bookmarks aren't imported and |
164 // the event routers need to be initialized for every profile individually, | 164 // the event routers need to be initialized for every profile individually, |
165 // initialize them with the extension service. | 165 // initialize them with the extension service. |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 313 } |
314 | 314 |
315 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 315 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
316 const std::string& extension_id, | 316 const std::string& extension_id, |
317 const extension_misc::UnloadedExtensionReason reason) { | 317 const extension_misc::UnloadedExtensionReason reason) { |
318 BrowserThread::PostTask( | 318 BrowserThread::PostTask( |
319 BrowserThread::IO, FROM_HERE, | 319 BrowserThread::IO, FROM_HERE, |
320 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), | 320 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), |
321 extension_id, reason)); | 321 extension_id, reason)); |
322 } | 322 } |
OLD | NEW |