Merge latest green inbound changeset to mozilla-central default
authorEd Morley <emorley@mozilla.com>
Wed, 03 Apr 2013 11:34:44 +0100
changeset 127138 3a5929ebc886
parent 127137 e60919ded783 (current diff)
parent 127083 686d76b44d9f (diff)
child 127139 2fb50725fc74
push id117
push usertomi.aarnio@nokia.com
push dateWed, 03 Apr 2013 12:07:07 +0000
milestone23.0a1
Merge latest green inbound changeset to mozilla-central
--- a/browser/devtools/framework/ToolDefinitions.jsm
+++ b/browser/devtools/framework/ToolDefinitions.jsm
@@ -142,17 +142,17 @@ let styleEditorDefinition = {
     let panel = new StyleEditorPanel(iframeWindow, toolbox);
     return panel.open();
   }
 };
 
 let profilerDefinition = {
   id: "jsprofiler",
   accesskey: l10n("profiler.accesskey", profilerStrings),
-  key: l10n("profiler.commandkey", profilerStrings),
+  key: l10n("profiler2.commandkey", profilerStrings),
   ordinal: 4,
   modifiers: "shift",
   killswitch: "devtools.profiler.enabled",
   url: "chrome://browser/content/profiler.xul",
   label: l10n("profiler.label", profilerStrings),
   icon: "chrome://browser/skin/devtools/tool-profiler.png",
   tooltip: l10n("profiler.tooltip", profilerStrings),
 
--- a/browser/locales/en-US/chrome/browser/devtools/profiler.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/profiler.properties
@@ -10,19 +10,19 @@
 # A good criteria is the language in which you'd find the best
 # documentation on web development on the web.
 
 # LOCALIZATION NOTE (profiler.label):
 # This string is displayed in the title of the tab when the profiler is
 # displayed inside the developer tools window and in the Developer Tools Menu.
 profiler.label=Profiler
 
-# LOCALIZATION NOTE (profiler.commandkey, profiler.accesskey)
+# LOCALIZATION NOTE (profiler2.commandkey, profiler.accesskey)
 # Used for the menuitem in the tool menu
-profiler.commandkey=VK_F5
+profiler2.commandkey=VK_F5
 profiler.accesskey=P
 
 # LOCALIZATION NOTE (profiler.tooltip):
 # This string is displayed in the tooltip of the tab when the profiler is
 # displayed inside the developer tools window.
 profiler.tooltip=Profiler
 
 # LOCALIZATION NOTE (profiler.profileName):
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -1667,19 +1667,25 @@ var XPIProvider = {
       } catch (e) { }
       this.addAddonsToCrashReporter();
     }
 
     AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_begin");
     for (let id in this.bootstrappedAddons) {
       let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
       file.persistentDescriptor = this.bootstrappedAddons[id].descriptor;
+      let reason = BOOTSTRAP_REASONS.APP_STARTUP;
+      // Eventually set INSTALLED reason when a bootstrap addon
+      // is dropped in profile folder and automatically installed
+      if (AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED)
+                      .indexOf(id) !== -1)
+        reason = BOOTSTRAP_REASONS.ADDON_INSTALL;
       this.callBootstrapMethod(id, this.bootstrappedAddons[id].version,
                                this.bootstrappedAddons[id].type, file,
-                               "startup", BOOTSTRAP_REASONS.APP_STARTUP);
+                               "startup", reason);
     }
     AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_end");
 
     // Let these shutdown a little earlier when they still have access to most
     // of XPCOM
     Services.obs.addObserver({
       observe: function shutdownObserver(aSubject, aTopic, aData) {
         for (let id in XPIProvider.bootstrappedAddons) {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap.js
@@ -482,17 +482,17 @@ function run_test_8() {
   AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "1.0");
     do_check_false(b1.appDisabled);
     do_check_false(b1.userDisabled);
     do_check_true(b1.isActive);
     do_check_eq(getInstalledVersion(), 1);
     do_check_eq(getActiveVersion(), 1);
-    do_check_eq(getStartupReason(), APP_STARTUP);
+    do_check_eq(getStartupReason(), ADDON_INSTALL);
     do_check_eq(getStartupOldVersion(), 0);
     do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
     do_check_bootstrappedPref(run_test_9);
   });
 }
 
 // Test that items detected as removed during startup get removed properly
@@ -661,17 +661,17 @@ function run_test_12() {
   AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
     do_check_neq(b1, null);
     do_check_eq(b1.version, "1.0");
     do_check_false(b1.appDisabled);
     do_check_false(b1.userDisabled);
     do_check_true(b1.isActive);
     do_check_eq(getInstalledVersion(), 1);
     do_check_eq(getActiveVersion(), 1);
-    do_check_eq(getStartupReason(), APP_STARTUP);
+    do_check_eq(getStartupReason(), ADDON_INSTALL);
     do_check_eq(getStartupOldVersion(), 0);
     do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
 
     b1.uninstall();
     restartManager();
 
     do_check_bootstrappedPref(run_test_13);
   });