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

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

Issue 463056: GTK: hook up drag and drop of browser actions (for reordering).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/extensions_service.h" 5 #include "chrome/browser/extensions/extensions_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 ExtensionDOMUI::RegisterChromeURLOverrides(profile_, 270 ExtensionDOMUI::RegisterChromeURLOverrides(profile_,
271 extension->GetChromeURLOverrides()); 271 extension->GetChromeURLOverrides());
272 272
273 NotifyExtensionLoaded(extension); 273 NotifyExtensionLoaded(extension);
274 UpdateActiveExtensionsInCrashReporter(); 274 UpdateActiveExtensionsInCrashReporter();
275 } 275 }
276 276
277 void ExtensionsService::DisableExtension(const std::string& extension_id) { 277 void ExtensionsService::DisableExtension(const std::string& extension_id) {
278 Extension* extension = GetExtensionByIdInternal(extension_id, true, false); 278 Extension* extension = GetExtensionByIdInternal(extension_id, true, false);
279 if (!extension) { 279 // The extension may have been disabled already.
280 NOTREACHED() << "Trying to disable an extension that isn't enabled."; 280 if (!extension)
281 return; 281 return;
282 }
283 282
284 // Remember that we disabled it, unless it's temporary. 283 // Remember that we disabled it, unless it's temporary.
285 if (extension->location() != Extension::LOAD) 284 if (extension->location() != Extension::LOAD)
286 extension_prefs_->SetExtensionState(extension, Extension::DISABLED); 285 extension_prefs_->SetExtensionState(extension, Extension::DISABLED);
287 286
288 // Move it over to the disabled list. 287 // Move it over to the disabled list.
289 disabled_extensions_.push_back(extension); 288 disabled_extensions_.push_back(extension);
290 ExtensionList::iterator iter = std::find(extensions_.begin(), 289 ExtensionList::iterator iter = std::find(extensions_.begin(),
291 extensions_.end(), 290 extensions_.end(),
292 extension); 291 extension);
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 1003
1005 void ExtensionsServiceBackend::OnExternalExtensionFound( 1004 void ExtensionsServiceBackend::OnExternalExtensionFound(
1006 const std::string& id, const Version* version, const FilePath& path, 1005 const std::string& id, const Version* version, const FilePath& path,
1007 Extension::Location location) { 1006 Extension::Location location) {
1008 ChromeThread::PostTask( 1007 ChromeThread::PostTask(
1009 ChromeThread::UI, FROM_HERE, 1008 ChromeThread::UI, FROM_HERE,
1010 NewRunnableMethod( 1009 NewRunnableMethod(
1011 frontend_, &ExtensionsService::OnExternalExtensionFound, id, 1010 frontend_, &ExtensionsService::OnExternalExtensionFound, id,
1012 version->GetString(), path, location)); 1011 version->GetString(), path, location));
1013 } 1012 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.cc ('k') | chrome/browser/gtk/bookmark_bar_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698