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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 6598002: Make the ChromeNetworkDelegate use the ExtensionEventRouterForwarder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use profile id Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index f318724d66073cefe0b16ef692270d23d425ceeb..c343448f22ada2f63d55eae7c3c7b91dfc7c9ee5 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -139,6 +139,18 @@ Profile* ProfileManager::GetProfile(const FilePath& profile_dir) {
return GetProfile(profile_dir, true);
}
+Profile* ProfileManager::GetProfileWithId(ProfileId profile_id) {
willchan no longer on Chromium 2011/02/28 21:48:41 I think it should be a bug for profile_id == kInva
+ for (iterator i = begin(); i != end(); ++i) {
+ if ((*i)->GetRuntimeId() == profile_id)
+ return *i;
+ if ((*i)->HasOffTheRecordProfile() &&
+ (*i)->GetOffTheRecordProfile()->GetRuntimeId() == profile_id) {
+ return (*i)->GetOffTheRecordProfile();
+ }
+ }
+ return NULL;
+}
+
bool ProfileManager::IsValidProfile(Profile* profile) {
for (iterator i = begin(); i != end(); ++i) {
if (*i == profile)

Powered by Google App Engine
This is Rietveld 408576698