Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8915)

Unified Diff: chrome_frame/utils.cc

Issue 1343002: Re-submit of GCF privacy patch in:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/utils.cc
===================================================================
--- chrome_frame/utils.cc (revision 42676)
+++ chrome_frame/utils.cc (working copy)
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "base/registry.h"
+#include "base/scoped_bstr_win.h"
#include "base/scoped_comptr_win.h"
#include "base/scoped_variant_win.h"
#include "base/string_util.h"
@@ -411,6 +412,34 @@
return ie_version;
}
+FilePath GetIETemporaryFilesFolder() {
+ DCHECK_EQ(BROWSER_IE, GetBrowserType());
+
+ LPITEMIDLIST tif_pidl = NULL;
+ HRESULT hr = SHGetFolderLocation(NULL, CSIDL_INTERNET_CACHE, NULL,
+ SHGFP_TYPE_CURRENT, &tif_pidl);
+ DCHECK(SUCCEEDED(hr) && tif_pidl);
+
+ ScopedComPtr<IShellFolder> parent_folder;
+ LPCITEMIDLIST relative_pidl = NULL;
+ hr = SHBindToParent(tif_pidl, IID_IShellFolder,
+ reinterpret_cast<void**>(parent_folder.Receive()),
+ &relative_pidl);
+ DCHECK(SUCCEEDED(hr) && relative_pidl);
+
+ STRRET path = {0};
+ hr = parent_folder->GetDisplayNameOf(relative_pidl,
+ SHGDN_NORMAL | SHGDN_FORPARSING,
+ &path);
+ DCHECK(SUCCEEDED(hr));
+ ScopedBstr tif_bstr;
+ StrRetToBSTR(&path, relative_pidl, tif_bstr.Receive());
+ FilePath tif(static_cast<BSTR>(tif_bstr));
+
+ ILFree(tif_pidl);
+ return tif;
+}
+
bool IsIEInPrivate() {
typedef BOOL (WINAPI* IEIsInPrivateBrowsingPtr)();
bool incognito_mode = false;
« no previous file with comments | « chrome_frame/utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698