diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-10 04:00:44 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-10 04:00:44 +0000 |
commit | 55219b348851f6f8d879ee333da73d33a6086f56 (patch) | |
tree | fb128a26aef46efd4c0c9bf5ba5905512ade6782 /chrome/browser/importer | |
parent | c696e71dd0d35fd098e3a18d4d609cca19271473 (diff) | |
download | chromium_src-55219b348851f6f8d879ee333da73d33a6086f56.zip chromium_src-55219b348851f6f8d879ee333da73d33a6086f56.tar.gz chromium_src-55219b348851f6f8d879ee333da73d33a6086f56.tar.bz2 |
use a local version of pstore declarations, fixes compilation for win8sdk + vs2012
pstore.h is not included post Windows SDK 7, which isn't installed/available when we're building with VS2012 + Win SDK 8.
BUG=154841, 149684, 143646
Review URL: https://chromiumcodereview.appspot.com/11086028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/ie_importer.cc | 2 | ||||
-rw-r--r-- | chrome/browser/importer/ie_importer_unittest_win.cc | 2 | ||||
-rw-r--r-- | chrome/browser/importer/pstore_declarations.h | 182 |
3 files changed, 184 insertions, 2 deletions
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc index 1c297d9..7bef316 100644 --- a/chrome/browser/importer/ie_importer.cc +++ b/chrome/browser/importer/ie_importer.cc @@ -6,7 +6,6 @@ #include <ole2.h> #include <intshcut.h> -#include <pstore.h> #include <shlobj.h> #include <urlhist.h> #include <wininet.h> @@ -29,6 +28,7 @@ #include "base/win/scoped_comptr.h" #include "base/win/scoped_handle.h" #include "base/win/windows_version.h" +#include "chrome/browser/importer/pstore_declarations.h" #include "chrome/browser/importer/importer_bridge.h" #include "chrome/browser/importer/importer_data_types.h" #include "chrome/browser/importer/importer_util.h" diff --git a/chrome/browser/importer/ie_importer_unittest_win.cc b/chrome/browser/importer/ie_importer_unittest_win.cc index a86345c..6af7540 100644 --- a/chrome/browser/importer/ie_importer_unittest_win.cc +++ b/chrome/browser/importer/ie_importer_unittest_win.cc @@ -8,7 +8,6 @@ #include <windows.h> #include <unknwn.h> #include <intshcut.h> -#include <pstore.h> #include <shlguid.h> #include <urlhist.h> #include <shlobj.h> @@ -35,6 +34,7 @@ #include "chrome/browser/importer/importer_progress_observer.h" #include "chrome/browser/importer/importer_unittest_utils.h" #include "chrome/browser/importer/ie_importer.h" +#include "chrome/browser/importer/pstore_declarations.h" #include "chrome/browser/password_manager/ie7_password.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/common/chrome_paths.h" diff --git a/chrome/browser/importer/pstore_declarations.h b/chrome/browser/importer/pstore_declarations.h new file mode 100644 index 0000000..805e549 --- /dev/null +++ b/chrome/browser/importer/pstore_declarations.h @@ -0,0 +1,182 @@ +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_IMPORTER_PSTORE_DECLARATIONS_H_ +#define CHROME_BROWSER_IMPORTER_PSTORE_DECLARATIONS_H_ + +#ifdef __PSTORE_H__ +#error Should not include pstore.h and this file simultaneously. +#endif + +#include <ole2.h> + +// pstore.h is no longer shipped in the Windows 8 SDK. Define a minimal set +// here. + +// These types are referenced in interfaces we use, but our code does not use +// refer to these types, so simply make them opaque. +class IEnumPStoreTypes; +struct PST_ACCESSRULESET; +struct PST_PROMPTINFO; +struct PST_PROVIDERINFO; +struct PST_TYPEINFO; + +EXTERN_C const IID IID_IPStore; +EXTERN_C const IID IID_IEnumPStoreItems; + +typedef DWORD PST_KEY; +typedef DWORD PST_ACCESSMODE; +#define PST_E_OK _HRESULT_TYPEDEF_(0x00000000L) + +interface IEnumPStoreItems : public IUnknown +{ + public: + virtual HRESULT STDMETHODCALLTYPE Next( + DWORD celt, + LPWSTR __RPC_FAR *rgelt, + DWORD __RPC_FAR *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip(DWORD celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset(void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + IEnumPStoreItems __RPC_FAR *__RPC_FAR *ppenum) = 0; +}; + +interface IPStore : public IUnknown +{ + public: + virtual HRESULT STDMETHODCALLTYPE GetInfo( + PST_PROVIDERINFO* __RPC_FAR *ppProperties) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetProvParam( + DWORD dwParam, + DWORD __RPC_FAR *pcbData, + BYTE __RPC_FAR *__RPC_FAR *ppbData, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProvParam( + DWORD dwParam, + DWORD cbData, + BYTE __RPC_FAR *pbData, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateType( + PST_KEY Key, + const GUID __RPC_FAR *pType, + PST_TYPEINFO* pInfo, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTypeInfo( + PST_KEY Key, + const GUID __RPC_FAR *pType, + PST_TYPEINFO* __RPC_FAR *ppInfo, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteType( + PST_KEY Key, + const GUID __RPC_FAR *pType, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSubtype( + PST_KEY Key, + const GUID __RPC_FAR *pType, + const GUID __RPC_FAR *pSubtype, + PST_TYPEINFO* pInfo, + PST_ACCESSRULESET* pRules, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSubtypeInfo( + PST_KEY Key, + const GUID __RPC_FAR *pType, + const GUID __RPC_FAR *pSubtype, + PST_TYPEINFO* __RPC_FAR *ppInfo, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteSubtype( + PST_KEY Key, + const GUID __RPC_FAR *pType, + const GUID __RPC_FAR *pSubtype, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReadAccessRuleset( + PST_KEY Key, + const GUID __RPC_FAR *pType, + const GUID __RPC_FAR *pSubtype, + PST_ACCESSRULESET* __RPC_FAR *ppRules, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE WriteAccessRuleset( + PST_KEY Key, + const GUID __RPC_FAR *pType, + const GUID __RPC_FAR *pSubtype, + PST_ACCESSRULESET* pRules, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumTypes( + PST_KEY Key, + DWORD dwFlags, + IEnumPStoreTypes __RPC_FAR *__RPC_FAR *ppenum) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumSubtypes( + PST_KEY Key, + const GUID __RPC_FAR *pType, + DWORD dwFlags, + IEnumPStoreTypes __RPC_FAR *__RPC_FAR *ppenum) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteItem( + PST_KEY Key, + const GUID __RPC_FAR *pItemType, + const GUID __RPC_FAR *pItemSubtype, + LPCWSTR szItemName, + PST_PROMPTINFO* pPromptInfo, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReadItem( + PST_KEY Key, + const GUID __RPC_FAR *pItemType, + const GUID __RPC_FAR *pItemSubtype, + LPCWSTR szItemName, + DWORD __RPC_FAR *pcbData, + BYTE __RPC_FAR *__RPC_FAR *ppbData, + PST_PROMPTINFO* pPromptInfo, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE WriteItem( + PST_KEY Key, + const GUID __RPC_FAR *pItemType, + const GUID __RPC_FAR *pItemSubtype, + LPCWSTR szItemName, + DWORD cbData, + BYTE __RPC_FAR *pbData, + PST_PROMPTINFO* pPromptInfo, + DWORD dwDefaultConfirmationStyle, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenItem( + PST_KEY Key, + const GUID __RPC_FAR *pItemType, + const GUID __RPC_FAR *pItemSubtype, + LPCWSTR szItemName, + PST_ACCESSMODE ModeFlags, + PST_PROMPTINFO* pPromptInfo, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE CloseItem( + PST_KEY Key, + const GUID __RPC_FAR *pItemType, + const GUID __RPC_FAR *pItemSubtype, + LPCWSTR szItemName, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumItems( + PST_KEY Key, + const GUID __RPC_FAR *pItemType, + const GUID __RPC_FAR *pItemSubtype, + DWORD dwFlags, + IEnumPStoreItems __RPC_FAR *__RPC_FAR *ppenum) = 0; +}; + +#endif // CHROME_BROWSER_IMPORTER_PSTORE_DECLARATIONS_H_ |