1

I have read this thread about how to set cookie storage path, and I want to

set my cookie in the same path with chrome browser default cookie path.

This is my code.

var
  CookieManager: ICefCookieManager;
  dir: string;
  setSuccess: Boolean;
begin
  dir := GetSpecialFolderPath(CSIDL_LOCAL_APPDATA, True);
  dir := dir + '\Google\Chrome\User Data\Default';//Chrome browser cookie path.
  CookieManager := TCefCookieManagerRef.GetGlobalManager;
  setSuccess := CookieManager.SetStoragePath(dir);
  if setSuccess then
    ShowMessage('set new path success!!');
end;

The message show, it means that Seting Storage Path is success.

When I executed my program and loaded my gmail with TChromium browser, it still
remain in login console, even without login information.

How can I fix it?

Community
  • 1
  • 1
user151465464
  • 93
  • 1
  • 5

1 Answers1

1

I guess that you execute your costom browser and chrome browser at the same time.

Looks like cookies is locked when chrome browser is executing.

user1531714
  • 111
  • 13
  • thanks for reply. As your guess, I executed both of them, but I can copy the file called 'cookies' in chrome. It's that means the cookie file is unlocked? – user151465464 Apr 23 '13 at 08:02