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

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

Issue 6040005: More cleanup of DefaultApps code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary change, add comments Created 9 years, 11 months 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 const FilePath& install_directory, 546 const FilePath& install_directory,
547 ExtensionPrefs* extension_prefs, 547 ExtensionPrefs* extension_prefs,
548 bool autoupdate_enabled) 548 bool autoupdate_enabled)
549 : profile_(profile), 549 : profile_(profile),
550 extension_prefs_(extension_prefs), 550 extension_prefs_(extension_prefs),
551 install_directory_(install_directory), 551 install_directory_(install_directory),
552 extensions_enabled_(true), 552 extensions_enabled_(true),
553 show_extensions_prompts_(true), 553 show_extensions_prompts_(true),
554 ready_(false), 554 ready_(false),
555 ALLOW_THIS_IN_INITIALIZER_LIST(toolbar_model_(this)), 555 ALLOW_THIS_IN_INITIALIZER_LIST(toolbar_model_(this)),
556 default_apps_(profile->GetPrefs()), 556 default_apps_(profile->GetPrefs(),
557 g_browser_process->GetApplicationLocale()),
557 event_routers_initialized_(false) { 558 event_routers_initialized_(false) {
558 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 559 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
559 560
560 // Figure out if extension installation should be enabled. 561 // Figure out if extension installation should be enabled.
561 if (command_line->HasSwitch(switches::kDisableExtensions)) { 562 if (command_line->HasSwitch(switches::kDisableExtensions)) {
562 extensions_enabled_ = false; 563 extensions_enabled_ = false;
563 } else if (profile->GetPrefs()->GetBoolean(prefs::kDisableExtensions)) { 564 } else if (profile->GetPrefs()->GetBoolean(prefs::kDisableExtensions)) {
564 extensions_enabled_ = false; 565 extensions_enabled_ = false;
565 } 566 }
566 567
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 } 2066 }
2066 2067
2067 void ExtensionService::SetBeingUpgraded(const Extension* extension, 2068 void ExtensionService::SetBeingUpgraded(const Extension* extension,
2068 bool value) { 2069 bool value) {
2069 extension_runtime_data_[extension->id()].being_upgraded = value; 2070 extension_runtime_data_[extension->id()].being_upgraded = value;
2070 } 2071 }
2071 2072
2072 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { 2073 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) {
2073 return &extension_runtime_data_[extension->id()].property_bag; 2074 return &extension_runtime_data_[extension->id()].property_bag;
2074 } 2075 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698