Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: chrome/browser/chromeos/profiles/profile_helper.h

Issue 1012083002: Resolve new GAIA flow's infinite loop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_CHROMEOS_PROFILES_PROFILE_HELPER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ 6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "chrome/browser/browsing_data/browsing_data_remover.h" 14 #include "chrome/browser/browsing_data/browsing_data_remover.h"
15 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" 15 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h"
16 #include "components/user_manager/user_manager.h" 16 #include "components/user_manager/user_manager.h"
17 17
18 class Profile; 18 class Profile;
19 class User; 19 class User;
20 20
21 namespace base { 21 namespace base {
22 class FilePath; 22 class FilePath;
23 } 23 }
24 24
25 namespace content {
26 class WebContents;
27 }
28
25 namespace extensions { 29 namespace extensions {
26 class ExtensionGarbageCollectorChromeOSUnitTest; 30 class ExtensionGarbageCollectorChromeOSUnitTest;
27 } 31 }
28 32
29 namespace chromeos { 33 namespace chromeos {
30 34
31 // This helper class is used on Chrome OS to keep track of currently 35 // This helper class is used on Chrome OS to keep track of currently
32 // active user profile. 36 // active user profile.
33 // Whenever active user is changed (either add another user into session or 37 // Whenever active user is changed (either add another user into session or
34 // switch between users), ActiveUserHashChanged() will be called thus 38 // switch between users), ActiveUserHashChanged() will be called thus
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 97
94 // Should called once after UserManager instance has been created. 98 // Should called once after UserManager instance has been created.
95 void Initialize(); 99 void Initialize();
96 100
97 // Returns hash for active user ID which is used to identify that user profile 101 // Returns hash for active user ID which is used to identify that user profile
98 // on Chrome OS. 102 // on Chrome OS.
99 std::string active_user_id_hash() { return active_user_id_hash_; } 103 std::string active_user_id_hash() { return active_user_id_hash_; }
100 104
101 // Clears site data (cookies, history, etc) for signin profile. 105 // Clears site data (cookies, history, etc) for signin profile.
102 // Callback can be empty. Not thread-safe. 106 // Callback can be empty. Not thread-safe.
103 void ClearSigninProfile(const base::Closure& on_clear_callback); 107 // |webview_contents| is an optional parameter (may be nullptr) that points to
108 // the host of a webview whose storage needs to be cleared as well.
109 void ClearSigninProfile(const base::Closure& on_clear_callback,
110 content::WebContents* webview_contents);
104 111
105 // Returns profile of the |user| if it is created and fully initialized. 112 // Returns profile of the |user| if it is created and fully initialized.
106 // Otherwise, returns NULL. 113 // Otherwise, returns NULL.
107 Profile* GetProfileByUser(const user_manager::User* user); 114 Profile* GetProfileByUser(const user_manager::User* user);
108 115
109 // DEPRECATED 116 // DEPRECATED
110 // Returns profile of the |user| if user's profile is created and fully 117 // Returns profile of the |user| if user's profile is created and fully
111 // initialized. Otherwise, if some user is active, returns his profile. 118 // initialized. Otherwise, if some user is active, returns his profile.
112 // Otherwise, returns signin profile. 119 // Otherwise, returns signin profile.
113 // Behaviour of this function does not correspond to its name and can be 120 // Behaviour of this function does not correspond to its name and can be
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // If true and enable_profile_to_user_testing is true then primary user will 198 // If true and enable_profile_to_user_testing is true then primary user will
192 // always be returned by GetUserByProfile(). 199 // always be returned by GetUserByProfile().
193 static bool always_return_primary_user_for_testing; 200 static bool always_return_primary_user_for_testing;
194 201
195 DISALLOW_COPY_AND_ASSIGN(ProfileHelper); 202 DISALLOW_COPY_AND_ASSIGN(ProfileHelper);
196 }; 203 };
197 204
198 } // namespace chromeos 205 } // namespace chromeos
199 206
200 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ 207 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698