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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 8591024: Correct the order of destruction of ProfileImplIOData and ExtensionProcessManager. This was causi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // prevent a race. 105 // prevent a race.
106 #if defined(OS_CHROMEOS) 106 #if defined(OS_CHROMEOS)
107 GetRequestContext(); 107 GetRequestContext();
108 #endif // defined(OS_CHROMEOS) 108 #endif // defined(OS_CHROMEOS)
109 109
110 // Make the chrome//extension-icon/ resource available. 110 // Make the chrome//extension-icon/ resource available.
111 ExtensionIconSource* icon_source = new ExtensionIconSource(profile_); 111 ExtensionIconSource* icon_source = new ExtensionIconSource(profile_);
112 GetChromeURLDataManager()->AddDataSource(icon_source); 112 GetChromeURLDataManager()->AddDataSource(icon_source);
113 113
114 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( 114 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
115 PluginPrefs::GetForProfile(this), &GetResourceContext()); 115 PluginPrefs::GetForProfile(this), &GetResourceContext());
116 116
117 BrowserThread::PostTask( 117 BrowserThread::PostTask(
118 BrowserThread::IO, FROM_HERE, 118 BrowserThread::IO, FROM_HERE,
119 base::Bind(&NotifyOTRProfileCreatedOnIOThread, profile_, this)); 119 base::Bind(&NotifyOTRProfileCreatedOnIOThread, profile_, this));
120 } 120 }
121 121
122 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { 122 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
123 content::NotificationService::current()->Notify( 123 content::NotificationService::current()->Notify(
124 chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this), 124 chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this),
125 content::NotificationService::NoDetails()); 125 content::NotificationService::NoDetails());
126 126
127 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( 127 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext(
128 &GetResourceContext()); 128 &GetResourceContext());
129 129
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 OffTheRecordProfileImpl* profile = NULL; 656 OffTheRecordProfileImpl* profile = NULL;
657 #if defined(OS_CHROMEOS) 657 #if defined(OS_CHROMEOS)
658 if (Profile::IsGuestSession()) 658 if (Profile::IsGuestSession())
659 profile = new GuestSessionProfile(this); 659 profile = new GuestSessionProfile(this);
660 #endif 660 #endif
661 if (!profile) 661 if (!profile)
662 profile = new OffTheRecordProfileImpl(this); 662 profile = new OffTheRecordProfileImpl(this);
663 profile->Init(); 663 profile->Init();
664 return profile; 664 return profile;
665 } 665 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698