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/api/runtime/runtime_api.h" | 5 #include "chrome/browser/extensions/api/runtime/runtime_api.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/extensions/event_router.h" | 9 #include "chrome/browser/extensions/event_router.h" |
10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 profile()->GetExtensionService()->extension_prefs()-> | 229 profile()->GetExtensionService()->extension_prefs()-> |
230 SetUninstallUrl(extension_id(), url_string); | 230 SetUninstallUrl(extension_id(), url_string); |
231 return true; | 231 return true; |
232 } | 232 } |
233 | 233 |
234 bool RuntimeReloadFunction::RunImpl() { | 234 bool RuntimeReloadFunction::RunImpl() { |
235 // We can't call ReloadExtension directly, since when this method finishes | 235 // We can't call ReloadExtension directly, since when this method finishes |
236 // it tries to decrease the reference count for the extension, which fails | 236 // it tries to decrease the reference count for the extension, which fails |
237 // if the extension has already been reloaded; so instead we post a task. | 237 // if the extension has already been reloaded; so instead we post a task. |
238 MessageLoop::current()->PostTask(FROM_HERE, | 238 base::MessageLoop::current()->PostTask(FROM_HERE, |
239 base::Bind(&ExtensionService::ReloadExtension, | 239 base::Bind(&ExtensionService::ReloadExtension, |
240 profile()->GetExtensionService()->AsWeakPtr(), | 240 profile()->GetExtensionService()->AsWeakPtr(), |
241 extension_id())); | 241 extension_id())); |
242 return true; | 242 return true; |
243 } | 243 } |
244 | 244 |
245 RuntimeRequestUpdateCheckFunction::RuntimeRequestUpdateCheckFunction() { | 245 RuntimeRequestUpdateCheckFunction::RuntimeRequestUpdateCheckFunction() { |
246 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND, | 246 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND, |
247 content::NotificationService::AllSources()); | 247 content::NotificationService::AllSources()); |
248 } | 248 } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 } else { | 357 } else { |
358 NOTREACHED(); | 358 NOTREACHED(); |
359 return false; | 359 return false; |
360 } | 360 } |
361 | 361 |
362 results_ = GetPlatformInfo::Results::Create(info); | 362 results_ = GetPlatformInfo::Results::Create(info); |
363 return true; | 363 return true; |
364 } | 364 } |
365 | 365 |
366 } // namespace extensions | 366 } // namespace extensions |
OLD | NEW |