| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    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 |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #ifndef CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ |    5 #ifndef CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ | 
|    6 #define CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ |    6 #define CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ | 
|    7  |    7  | 
|    8 #include <map> |    8 #include <map> | 
|    9 #include <string> |    9 #include <string> | 
|   10  |   10  | 
|   11 #include "base/memory/scoped_ptr.h" |   11 #include "base/memory/scoped_ptr.h" | 
|   12 #include "base/observer_list.h" |   12 #include "base/observer_list.h" | 
|   13 #include "base/values.h" |   13 #include "base/values.h" | 
|   14 #include "chrome/browser/profiles/profile_keyed_service.h" |   14 #include "chrome/browser/profiles/profile_keyed_service.h" | 
|   15 #include "chrome/browser/signin/signin_internals_util.h" |   15 #include "chrome/browser/signin/signin_internals_util.h" | 
|   16 #include "chrome/browser/signin/signin_manager.h" |   16 #include "chrome/browser/signin/signin_manager.h" | 
|   17 #include "chrome/browser/signin/signin_manager_factory.h" |   17 #include "chrome/browser/signin/signin_manager_factory.h" | 
|   18 #include "chrome/common/chrome_version_info.h" |   18 #include "chrome/common/chrome_version_info.h" | 
|   19  |   19  | 
|   20 class Profile; |   20 class Profile; | 
|   21  |   21  | 
|   22 // This class collects authentication, signin and token information |   22 // This class collects authentication, signin and token information | 
|   23 // to propagate to about:signin-internals via SigninInternalsUI. |   23 // to propagate to about:signin-internals via SigninInternalsUI. | 
|   24 class AboutSigninInternals |   24 class AboutSigninInternals | 
|   25     : public ProfileKeyedService, |   25     : public ProfileKeyedService, | 
|   26       public signin_internals_util::SigninDiagnosticsObserver { |   26       public signin_internals_util::SigninDiagnosticsObserver { | 
|   27  public: |   27  public: | 
|   28   class Observer { |   28   class Observer { | 
|   29    public: |   29    public: | 
 |   30     virtual ~Observer() { } | 
 |   31  | 
|   30     // |info| will contain the dictionary of signin_status_ values as indicated |   32     // |info| will contain the dictionary of signin_status_ values as indicated | 
|   31     // in the comments for GetSigninStatus() below. |   33     // in the comments for GetSigninStatus() below. | 
|   32     virtual void OnSigninStateChanged(scoped_ptr<DictionaryValue> info) = 0; |   34     virtual void OnSigninStateChanged(scoped_ptr<DictionaryValue> info) = 0; | 
|   33   }; |   35   }; | 
|   34  |   36  | 
|   35   AboutSigninInternals(); |   37   AboutSigninInternals(); | 
|   36   virtual ~AboutSigninInternals(); |   38   virtual ~AboutSigninInternals(); | 
|   37  |   39  | 
|   38   // Each instance of SigninInternalsUI adds itself as an observer to be |   40   // Each instance of SigninInternalsUI adds itself as an observer to be | 
|   39   // notified of all updates that AboutSigninInternals receives. |   41   // notified of all updates that AboutSigninInternals receives. | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   91   // Encapsulates the actual signin and token related values. |   93   // Encapsulates the actual signin and token related values. | 
|   92   // Most of the values are mirrored in the prefs for persistance. |   94   // Most of the values are mirrored in the prefs for persistance. | 
|   93   signin_internals_util::SigninStatus signin_status_; |   95   signin_internals_util::SigninStatus signin_status_; | 
|   94  |   96  | 
|   95   ObserverList<Observer> signin_observers_; |   97   ObserverList<Observer> signin_observers_; | 
|   96  |   98  | 
|   97   DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); |   99   DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); | 
|   98 }; |  100 }; | 
|   99  |  101  | 
|  100 #endif  // CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ |  102 #endif  // CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ | 
| OLD | NEW |