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

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

Issue 7285014: [wip] Profile: Sketch of a creation system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 5 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 | 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/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // 210 //
211 //////////////////////////////////////////////////////////////////////////////// 211 ////////////////////////////////////////////////////////////////////////////////
212 class OffTheRecordProfileImpl : public Profile, 212 class OffTheRecordProfileImpl : public Profile,
213 public BrowserList::Observer { 213 public BrowserList::Observer {
214 public: 214 public:
215 explicit OffTheRecordProfileImpl(Profile* real_profile) 215 explicit OffTheRecordProfileImpl(Profile* real_profile)
216 : profile_(real_profile), 216 : profile_(real_profile),
217 prefs_(real_profile->GetOffTheRecordPrefs()), 217 prefs_(real_profile->GetOffTheRecordPrefs()),
218 ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)), 218 ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)),
219 start_time_(Time::Now()) { 219 start_time_(Time::Now()) {
220 #ifndef NDEBUG
221 ProfileDependencyManager::GetInstance()->ProfileNowExists(this);
222 #endif
223
224 extension_process_manager_.reset(ExtensionProcessManager::Create(this)); 220 extension_process_manager_.reset(ExtensionProcessManager::Create(this));
225 221
226 BrowserList::AddObserver(this); 222 BrowserList::AddObserver(this);
227 223
228 BackgroundContentsServiceFactory::GetForProfile(this); 224 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false);
229 225
230 DCHECK(real_profile->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)); 226 DCHECK(real_profile->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled));
231 227
232 // TODO(oshima): Remove the need to eagerly initialize the request context 228 // TODO(oshima): Remove the need to eagerly initialize the request context
233 // getter. chromeos::OnlineAttempt is illegally trying to access this 229 // getter. chromeos::OnlineAttempt is illegally trying to access this
234 // Profile member from a thread other than the UI thread, so we need to 230 // Profile member from a thread other than the UI thread, so we need to
235 // prevent a race. 231 // prevent a race.
236 #if defined(OS_CHROMEOS) 232 #if defined(OS_CHROMEOS)
237 GetRequestContext(); 233 GetRequestContext();
238 #endif // defined(OS_CHROMEOS) 234 #endif // defined(OS_CHROMEOS)
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 }; 840 };
845 #endif 841 #endif
846 842
847 Profile* Profile::CreateOffTheRecordProfile() { 843 Profile* Profile::CreateOffTheRecordProfile() {
848 #if defined(OS_CHROMEOS) 844 #if defined(OS_CHROMEOS)
849 if (Profile::IsGuestSession()) 845 if (Profile::IsGuestSession())
850 return new GuestSessionProfile(this); 846 return new GuestSessionProfile(this);
851 #endif 847 #endif
852 return new OffTheRecordProfileImpl(this); 848 return new OffTheRecordProfileImpl(this);
853 } 849 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698