summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/external_cookie_handler.cc
diff options
context:
space:
mode:
authorcmasone@google.com <cmasone@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 03:14:40 +0000
committercmasone@google.com <cmasone@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 03:14:40 +0000
commitb6270acaa846c4a3b767b527354fbd875680118f (patch)
tree2b6cfc6732b10ea0400cbdb82231567a4ec53619 /chrome/browser/chromeos/external_cookie_handler.cc
parent309b764b38f67d23f8b12488e6d1f542ca19b13e (diff)
downloadchromium_src-b6270acaa846c4a3b767b527354fbd875680118f.zip
chromium_src-b6270acaa846c4a3b767b527354fbd875680118f.tar.gz
chromium_src-b6270acaa846c4a3b767b527354fbd875680118f.tar.bz2
Views-based login window for Chrome OS. Doesn't yet actually do anything
Review URL: http://codereview.chromium.org/449023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34134 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/external_cookie_handler.cc')
-rw-r--r--chrome/browser/chromeos/external_cookie_handler.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/external_cookie_handler.cc b/chrome/browser/chromeos/external_cookie_handler.cc
index a3cf9d5..525ed80 100644
--- a/chrome/browser/chromeos/external_cookie_handler.cc
+++ b/chrome/browser/chromeos/external_cookie_handler.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/external_cookie_handler.h"
#include "base/command_line.h"
+#include "base/file_util.h"
#include "chrome/browser/chromeos/pipe_reader.h"
#include "chrome/browser/net/url_request_context_getter.h"
#include "chrome/browser/profile.h"
@@ -19,11 +20,14 @@ void ExternalCookieHandler::GetCookies(const CommandLine& parsed_command_line,
Profile* profile) {
// If there are Google External SSO cookies, add them to the cookie store.
if (parsed_command_line.HasSwitch(switches::kCookiePipe)) {
- std::string pipe_name =
- parsed_command_line.GetSwitchValueASCII(switches::kCookiePipe);
- ExternalCookieHandler cookie_handler(new PipeReader(pipe_name));
- cookie_handler.HandleCookies(
- profile->GetRequestContext()->GetCookieStore());
+ FilePath cookie_pipe =
+ parsed_command_line.GetSwitchValuePath(switches::kCookiePipe);
+ if (file_util::PathExists(cookie_pipe)) {
+ ExternalCookieHandler cookie_handler(new PipeReader(cookie_pipe));
+ cookie_handler.HandleCookies(
+ profile->GetRequestContext()->GetCookieStore());
+ file_util::Delete(cookie_pipe, false);
+ }
}
}