OLD | NEW |
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/extensions_service.h" | 5 #include "chrome/browser/extensions/extensions_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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 << "id: " << extension_id; | 524 << "id: " << extension_id; |
525 return false; | 525 return false; |
526 } | 526 } |
527 | 527 |
528 return true; | 528 return true; |
529 } | 529 } |
530 | 530 |
531 ExtensionsService::ExtensionsService(Profile* profile, | 531 ExtensionsService::ExtensionsService(Profile* profile, |
532 const CommandLine* command_line, | 532 const CommandLine* command_line, |
533 const FilePath& install_directory, | 533 const FilePath& install_directory, |
| 534 ExtensionPrefs* extension_prefs, |
534 bool autoupdate_enabled) | 535 bool autoupdate_enabled) |
535 : profile_(profile), | 536 : profile_(profile), |
536 extension_prefs_(new ExtensionPrefs(profile->GetPrefs(), | 537 extension_prefs_(extension_prefs), |
537 install_directory)), | |
538 install_directory_(install_directory), | 538 install_directory_(install_directory), |
539 extensions_enabled_(true), | 539 extensions_enabled_(true), |
540 show_extensions_prompts_(true), | 540 show_extensions_prompts_(true), |
541 ready_(false), | 541 ready_(false), |
542 ALLOW_THIS_IN_INITIALIZER_LIST(toolbar_model_(this)), | 542 ALLOW_THIS_IN_INITIALIZER_LIST(toolbar_model_(this)), |
543 default_apps_(profile->GetPrefs()), | 543 default_apps_(profile->GetPrefs()), |
544 event_routers_initialized_(false) { | 544 event_routers_initialized_(false) { |
545 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 545 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
546 | 546 |
547 // Figure out if extension installation should be enabled. | 547 // Figure out if extension installation should be enabled. |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1939 } | 1939 } |
1940 | 1940 |
1941 bool ExtensionsService::IsBeingUpgraded(const Extension* extension) { | 1941 bool ExtensionsService::IsBeingUpgraded(const Extension* extension) { |
1942 return extension_runtime_data_[extension->id()].being_upgraded; | 1942 return extension_runtime_data_[extension->id()].being_upgraded; |
1943 } | 1943 } |
1944 | 1944 |
1945 void ExtensionsService::SetBeingUpgraded(const Extension* extension, | 1945 void ExtensionsService::SetBeingUpgraded(const Extension* extension, |
1946 bool value) { | 1946 bool value) { |
1947 extension_runtime_data_[extension->id()].being_upgraded = value; | 1947 extension_runtime_data_[extension->id()].being_upgraded = value; |
1948 } | 1948 } |
OLD | NEW |