Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 846945 - Downloaded / saved files should be searchable from the M…

…etro Search charm. r=jimm.
  • Loading branch information...
commit 2d80d85f7e3a108c1e11603d0ea2ea578c12e29f 1 parent 9031999
@bbondy bbondy authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 uriloader/exthandler/nsExternalHelperAppService.cpp
View
14 uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -107,6 +107,10 @@
#include "nsIDocShellTreeItem.h"
#include "ExternalHelperAppChild.h"
+#ifdef XP_WIN
+#include "nsWindowsHelpers.h"
+#endif
+
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#endif
@@ -346,6 +350,16 @@ static nsresult GetDownloadDirectory(nsIFile **_directory)
#elif defined(MOZ_PLATFORM_MAEMO)
nsresult rv = NS_GetSpecialDirectory(NS_UNIX_XDG_DOCUMENTS_DIR, getter_AddRefs(dir));
NS_ENSURE_SUCCESS(rv, rv);
+#elif defined(XP_WIN)
+ // On metro we want to be able to search opened files and the temp directory
+ // is exlcuded in searches.
+ nsresult rv;
+ if (IsRunningInWindowsMetro()) {
+ rv = NS_GetSpecialDirectory(NS_WIN_DEFAULT_DOWNLOAD_DIR, getter_AddRefs(dir));
+ } else {
+ rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(dir));
+ }
+ NS_ENSURE_SUCCESS(rv, rv);
#else
// On all other platforms, we default to the systems temporary directory.
nsresult rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(dir));
Please sign in to comment.
Something went wrong with that request. Please try again.