Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
michael@0 | 1 | /* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- */ |
michael@0 | 2 | /* Copyright 2012 Mozilla Foundation and Mozilla contributors |
michael@0 | 3 | * |
michael@0 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
michael@0 | 5 | * you may not use this file except in compliance with the License. |
michael@0 | 6 | * You may obtain a copy of the License at |
michael@0 | 7 | * |
michael@0 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
michael@0 | 9 | * |
michael@0 | 10 | * Unless required by applicable law or agreed to in writing, software |
michael@0 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
michael@0 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
michael@0 | 13 | * See the License for the specific language governing permissions and |
michael@0 | 14 | * limitations under the License. |
michael@0 | 15 | */ |
michael@0 | 16 | |
michael@0 | 17 | #include "nsOSHelperAppService.h" |
michael@0 | 18 | #include "nsMIMEInfoImpl.h" |
michael@0 | 19 | |
michael@0 | 20 | class nsGonkMIMEInfo : public nsMIMEInfoImpl { |
michael@0 | 21 | public: |
michael@0 | 22 | nsGonkMIMEInfo(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) { } |
michael@0 | 23 | |
michael@0 | 24 | protected: |
michael@0 | 25 | virtual NS_HIDDEN_(nsresult) LoadUriInternal(nsIURI *aURI) { |
michael@0 | 26 | return NS_ERROR_NOT_IMPLEMENTED; |
michael@0 | 27 | } |
michael@0 | 28 | }; |
michael@0 | 29 | |
michael@0 | 30 | nsOSHelperAppService::nsOSHelperAppService() : nsExternalHelperAppService() |
michael@0 | 31 | { |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | nsOSHelperAppService::~nsOSHelperAppService() |
michael@0 | 35 | { |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | already_AddRefed<nsIMIMEInfo> |
michael@0 | 39 | nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType, |
michael@0 | 40 | const nsACString& aFileExt, |
michael@0 | 41 | bool* aFound) |
michael@0 | 42 | { |
michael@0 | 43 | *aFound = false; |
michael@0 | 44 | // Even if we return false for aFound, we need to return a working |
michael@0 | 45 | // nsIMIMEInfo implementation that will be used by the caller. |
michael@0 | 46 | nsRefPtr<nsGonkMIMEInfo> mimeInfo = new nsGonkMIMEInfo(aMIMEType); |
michael@0 | 47 | return mimeInfo.forget(); |
michael@0 | 48 | } |
michael@0 | 49 | |
michael@0 | 50 | nsresult |
michael@0 | 51 | nsOSHelperAppService::OSProtocolHandlerExists(const char* aScheme, |
michael@0 | 52 | bool* aExists) |
michael@0 | 53 | { |
michael@0 | 54 | *aExists = false; |
michael@0 | 55 | return NS_OK; |
michael@0 | 56 | } |