diff options
author | slightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 04:16:20 +0000 |
---|---|---|
committer | slightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 04:16:20 +0000 |
commit | bc73b4e541f57b44ac4c53df2589d91549f27eaf (patch) | |
tree | 47cf0721b0f9d9cd0a9c83196d4091120300f3a4 /chrome_frame/chrome_frame_activex_base.h | |
parent | 46215d5ef32784db5544fc5f7ba06b6617935fec (diff) | |
download | chromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.zip chromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.tar.gz chromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.tar.bz2 |
3rd try. *sigh*
See: http://codereview.chromium.org/858003
TBR=tommi
BUG=22846
TEST=On IE 8, clear the cache entirely, watch GCF launch (via task manager)
Review URL: http://codereview.chromium.org/1343004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex_base.h')
-rw-r--r-- | chrome_frame/chrome_frame_activex_base.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h index d29eb65..2b9d60d 100644 --- a/chrome_frame/chrome_frame_activex_base.h +++ b/chrome_frame/chrome_frame_activex_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -9,21 +9,6 @@ #include <atlcom.h> #include <atlctl.h> #include <wininet.h> - -// Copied min/max defs from windows headers to appease atlimage.h. -// TODO(slightlyoff): Figure out of more recent platform SDK's (> 6.1) -// undo the janky "#define NOMINMAX" train wreck. See: -// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=100703 -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) // NOLINT -#endif -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) // NOLINT -#endif -#include <atlimage.h> -#undef max -#undef min - #include <shdeprecated.h> // for IBrowserService2 #include <shlguid.h> @@ -36,19 +21,23 @@ #include "base/scoped_variant_win.h" #include "base/string_util.h" #include "grit/chrome_frame_resources.h" +#include "chrome/common/url_constants.h" #include "chrome_frame/chrome_frame_plugin.h" #include "chrome_frame/com_message_event.h" #include "chrome_frame/com_type_info_holder.h" #include "chrome_frame/simple_resource_loader.h" #include "chrome_frame/urlmon_url_request.h" #include "chrome_frame/urlmon_url_request_private.h" -#include "chrome/common/url_constants.h" +#include "chrome_frame/utils.h" #include "grit/generated_resources.h" #include "net/base/cookie_monster.h" // Include without path to make GYP build see it. #include "chrome_tab.h" // NOLINT +static const wchar_t kIexploreProfileName[] = L"iexplore"; +static const wchar_t kRundllProfileName[] = L"rundll32"; + // Connection point class to support firing IChromeFrameEvents (dispinterface). template<class T> class ATL_NO_VTABLE ProxyDIChromeFrameEvents @@ -361,6 +350,22 @@ END_MSG_MAP() } protected: + virtual void GetProfilePath(const std::wstring& profile_name, + FilePath* profile_path) { + bool is_IE = (lstrcmpi(profile_name.c_str(), kIexploreProfileName) == 0) || + (lstrcmpi(profile_name.c_str(), kRundllProfileName) == 0); + // Browsers without IDeleteBrowsingHistory in non-priv mode + // have their profiles moved into "Temporary Internet Files". + if (is_IE && GetIEVersion() < IE_8 && !is_privileged_) { + *profile_path = GetIETemporaryFilesFolder(); + *profile_path = profile_path->Append(L"Google Chrome Frame"); + } else { + ChromeFramePlugin::GetProfilePath(profile_name, profile_path); + } + DLOG(INFO) << __FUNCTION__ << ": " << profile_path->value(); + } + + void OnLoad(int tab_handle, const GURL& url) { if (ready_state_ < READYSTATE_COMPLETE) { ready_state_ = READYSTATE_COMPLETE; |