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

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: updates 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
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c44e21874985faa61a0aa9da9f30dc9687d016ef 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -139,6 +139,19 @@ Profile* ProfileManager::GetProfile(const FilePath& profile_dir) {
return GetProfile(profile_dir, true);
}
+Profile* ProfileManager::GetProfileWithId(ProfileId profile_id) {
+ DCHECK_NE(Profile::kInvalidProfileId, profile_id);
+ 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)
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698