Skip to content

Commit

Permalink
Always use flag needed by CEEE. Now that we use the same profile for
Browse files Browse the repository at this point in the history
CF and CEEE, we need to ensure they both start Chrome with the same
flags.

Since IChromeFramePrivileged is a private/unfrozen interface, I simply
removed the GetChromeExtraArguments method as we are no longer using it.

BUG=63427
TEST=none


Review URL: http://codereview.chromium.org/5109006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66916 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
joi@chromium.org committed Nov 21, 2010
1 parent 146185d commit a55c1d6
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 57 deletions.
11 changes: 0 additions & 11 deletions ceee/ie/common/chrome_frame_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,6 @@ STDMETHODIMP ChromeFrameHost::GetWantsPrivileged(boolean* wants_privileged) {
return S_OK;
}

STDMETHODIMP ChromeFrameHost::GetChromeExtraArguments(BSTR* args) {
DCHECK(args);

// Extra arguments are passed on verbatim, so we add the -- prefix.
CComBSTR str = "--";
str.Append(switches::kEnableExperimentalExtensionApis);

*args = str.Detach();
return S_OK;
}

STDMETHODIMP ChromeFrameHost::GetChromeProfileName(BSTR* profile_name) {
return chrome_profile_name_.CopyTo(profile_name);
}
Expand Down
1 change: 0 additions & 1 deletion ceee/ie/common/chrome_frame_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class ATL_NO_VTABLE ChromeFrameHost
// @name IChromeFramePrivileged implementation.
// @{
STDMETHOD(GetWantsPrivileged)(boolean* wants_privileged);
STDMETHOD(GetChromeExtraArguments)(BSTR* args);
STDMETHOD(GetChromeProfileName)(BSTR* args);
STDMETHOD(GetExtensionApisToAutomate)(BSTR* functions_enabled);
STDMETHOD(ShouldShowVersionMismatchDialog)();
Expand Down
13 changes: 0 additions & 13 deletions ceee/ie/plugin/bho/infobar_browser_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,6 @@ STDMETHODIMP InfobarBrowserWindow::GetWantsPrivileged(
return S_OK;
}

STDMETHODIMP InfobarBrowserWindow::GetChromeExtraArguments(BSTR* args) {
DCHECK(args);

// Must enable experimental extensions because we want to load html pages
// from our extension.
// Extra arguments are passed on verbatim, so we add the -- prefix.
CComBSTR str = "--";
str.Append(switches::kEnableExperimentalExtensionApis);

*args = str.Detach();
return S_OK;
}

STDMETHODIMP InfobarBrowserWindow::GetChromeProfileName(BSTR* profile_name) {
*profile_name = ::SysAllocString(
ceee_module_util::GetBrokerProfileNameForIe());
Expand Down
1 change: 0 additions & 1 deletion ceee/ie/plugin/bho/infobar_browser_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ class ATL_NO_VTABLE InfobarBrowserWindow
// @name IChromeFramePrivileged implementation.
// @{
STDMETHOD(GetWantsPrivileged)(boolean *wants_privileged);
STDMETHOD(GetChromeExtraArguments)(BSTR *args);
STDMETHOD(GetChromeProfileName)(BSTR *args);
STDMETHOD(GetExtensionApisToAutomate)(BSTR *args);
STDMETHOD(ShouldShowVersionMismatchDialog)();
Expand Down
11 changes: 0 additions & 11 deletions ceee/ie/plugin/toolband/tool_band.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,6 @@ STDMETHODIMP ToolBand::GetWantsPrivileged(boolean* wants_privileged) {
return S_OK;
}

STDMETHODIMP ToolBand::GetChromeExtraArguments(BSTR* args) {
DCHECK(args);

// Extra arguments are passed on verbatim, so we add the -- prefix.
CComBSTR str = "--";
str.Append(switches::kEnableExperimentalExtensionApis);

*args = str.Detach();
return S_OK;
}

STDMETHODIMP ToolBand::GetChromeProfileName(BSTR* profile_name) {
*profile_name = ::SysAllocString(
ceee_module_util::GetBrokerProfileNameForIe());
Expand Down
1 change: 0 additions & 1 deletion ceee/ie/plugin/toolband/tool_band.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class ATL_NO_VTABLE ToolBand : public CComObjectRootEx<CComSingleThreadModel>,
// @name IChromeFramePrivileged implementation.
// @{
STDMETHOD(GetWantsPrivileged)(boolean *wants_privileged);
STDMETHOD(GetChromeExtraArguments)(BSTR *args);
STDMETHOD(GetChromeProfileName)(BSTR *args);
STDMETHOD(GetExtensionApisToAutomate)(BSTR *args);
STDMETHOD(ShouldShowVersionMismatchDialog)();
Expand Down
11 changes: 7 additions & 4 deletions chrome_frame/chrome_frame.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
},
},
'dependencies': [
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:automation',
'../chrome/chrome.gyp:installer_util',
'../google_update/google_update.gyp:google_update',
Expand Down Expand Up @@ -429,7 +429,7 @@
'dependencies': [
'../breakpad/breakpad.gyp:breakpad_handler',
'../chrome/chrome.gyp:automation',
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:installer_util',
'../google_update/google_update.gyp:google_update',
],
Expand Down Expand Up @@ -497,7 +497,7 @@
'dependencies': [
'../breakpad/breakpad.gyp:breakpad_handler',
'../chrome/chrome.gyp:automation',
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:chrome_dll_version',
'../chrome/chrome.gyp:installer_util',
'../google_update/google_update.gyp:google_update',
Expand Down Expand Up @@ -808,7 +808,8 @@
'/c', '<(RULE_INPUT_PATH)',
],
'process_outputs_as_sources': 0,
'message': 'Assembling <(RULE_INPUT_PATH) to <(INTERMEDIATE_DIR)\<(RULE_INPUT_ROOT).obj.',
'message':
'Assembling <(RULE_INPUT_PATH) to <(INTERMEDIATE_DIR)\<(RULE_INPUT_ROOT).obj.',
},
],
'msvs_settings': {
Expand Down Expand Up @@ -886,6 +887,8 @@
'resource.h',
],
'include_dirs': [
# For chrome_tab.h
'<(SHARED_INTERMEDIATE_DIR)',
'<(INTERMEDIATE_DIR)/../npchrome_frame',
],
'conditions': [
Expand Down
17 changes: 9 additions & 8 deletions chrome_frame/chrome_frame_activex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -453,16 +453,8 @@ HRESULT ChromeFrameActivex::IOleObject_SetClientSite(
url_fetcher_->set_privileged_mode(is_privileged_);
}

std::wstring chrome_extra_arguments;
std::wstring profile_name(GetHostProcessName(false));
if (is_privileged_) {
// Does the host want to provide extra arguments?
base::win::ScopedBstr extra_arguments_arg;
service_hr = service->GetChromeExtraArguments(
extra_arguments_arg.Receive());
if (S_OK == service_hr && extra_arguments_arg)
chrome_extra_arguments.assign(extra_arguments_arg,
extra_arguments_arg.Length());

base::win::ScopedBstr automated_functions_arg;
service_hr = service->GetExtensionApisToAutomate(
Expand Down Expand Up @@ -490,6 +482,15 @@ HRESULT ChromeFrameActivex::IOleObject_SetClientSite(

InitializeAutomationSettings();

// To avoid http://code.google.com/p/chromium/issues/detail?id=63427,
// we always pass this flag needed by CEEE. It has no effect on
// normal CF operation.
//
// Extra arguments are passed on verbatim, so we add the -- prefix.
std::wstring chrome_extra_arguments(L"--");
chrome_extra_arguments.append(
ASCIIToWide(switches::kEnableExperimentalExtensionApis));

url_fetcher_->set_frame_busting(!is_privileged_);
automation_client_->SetUrlFetcher(url_fetcher_.get());
if (!InitializeAutomation(profile_name, chrome_extra_arguments,
Expand Down
13 changes: 6 additions & 7 deletions chrome_frame/chrome_tab.idl
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ interface IChromeFrame : IDispatch {
};

[
object,
object,
uuid(851bedec-4b2c-4959-abc0-a53403117257),
local, // This interface should never be marshaled.
hidden,
local, // This interface should never be marshaled.
hidden,
]
// Internal implementation interface. Not intended as an API. May change
// frequently, don't treat this as frozen.
Expand All @@ -98,18 +98,17 @@ interface IChromeFrameInternal : IUnknown {

[
object,
uuid(8AD52429-3CE0-4883-BC69-2DFA055D20D4),
uuid(B1B52A4D-B22E-489f-8CCD-1CF9166FA90E),
oleautomation,
nonextensible,
hidden,
]
// Internal implementation interface. Not intended as an API. May change
// frequently, don't treat this as frozen.
interface IChromeFramePrivileged : IUnknown {
// If the host returns false for wants_privileged, the control
// won't enable privileged mode.
HRESULT GetWantsPrivileged([out] boolean *wants_privileged);
// Extra arguments to supply to the Chrome instance. Returns S_FALSE when
// no extra arguments are needed. Always sets the output string to non-NULL.
HRESULT GetChromeExtraArguments([out] BSTR *args);
// The profile name we want to use.
HRESULT GetChromeProfileName([out] BSTR *profile_name);
// The comma-separated list of extension API functions you wish to automate.
Expand Down

0 comments on commit a55c1d6

Please sign in to comment.