Home | History | Annotate | Download | only in login
      1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_
      6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_
      7 
      8 #include <string>
      9 #include "base/callback.h"
     10 
     11 namespace content {
     12 class BrowserContext;
     13 }
     14 
     15 namespace chromeos {
     16 
     17 // Helper class for transferring authentication related data from one
     18 // BrowserContext to another: proxy auth cache, cookies, server bound certs.
     19 class ProfileAuthData {
     20  public:
     21   // Transfers proxy authentication cache and optionally |transfer_cookies| and
     22   // server bound certs from the BrowserContext that was used for
     23   // authentication. |completion_callback| will be called on UI thread after
     24   // the operation is completed.
     25   static void Transfer(content::BrowserContext* from_context,
     26                        content::BrowserContext* to_context,
     27                        bool transfer_cookies,
     28                        const base::Closure& completion_callback);
     29 
     30  private:
     31   DISALLOW_IMPLICIT_CONSTRUCTORS(ProfileAuthData);
     32 };
     33 
     34 }  // namespace chromeos
     35 
     36 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_
     37