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

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

Issue 1741953002: mojo: Sketch a profile application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't add a boolean to BrowserContext; allocate an object instead. Created 4 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
« no previous file with comments | « blimp/engine/common/blimp_browser_context.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 ->OnOTRBrowserContextDestroyed(original_profile, otr_profile); 111 ->OnOTRBrowserContextDestroyed(original_profile, otr_profile);
112 } 112 }
113 113
114 } // namespace 114 } // namespace
115 #endif 115 #endif
116 116
117 OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile) 117 OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile* real_profile)
118 : profile_(real_profile), 118 : profile_(real_profile),
119 prefs_(PrefServiceSyncableIncognitoFromProfile(real_profile)), 119 prefs_(PrefServiceSyncableIncognitoFromProfile(real_profile)),
120 start_time_(Time::Now()) { 120 start_time_(Time::Now()) {
121 BrowserContext::Initialize(this, profile_->GetPath());
121 // Register on BrowserContext. 122 // Register on BrowserContext.
122 user_prefs::UserPrefs::Set(this, prefs_); 123 user_prefs::UserPrefs::Set(this, prefs_);
123 } 124 }
124 125
125 void OffTheRecordProfileImpl::Init() { 126 void OffTheRecordProfileImpl::Init() {
126 // The construction of OffTheRecordProfileIOData::Handle needs the profile 127 // The construction of OffTheRecordProfileIOData::Handle needs the profile
127 // type returned by this->GetProfileType(). Since GetProfileType() is a 128 // type returned by this->GetProfileType(). Since GetProfileType() is a
128 // virtual member function, we cannot call the function defined in the most 129 // virtual member function, we cannot call the function defined in the most
129 // derived class (e.g. GuestSessionProfile) until a ctor finishes. Thus, 130 // derived class (e.g. GuestSessionProfile) until a ctor finishes. Thus,
130 // we have to instantiate OffTheRecordProfileIOData::Handle here after a ctor. 131 // we have to instantiate OffTheRecordProfileIOData::Handle here after a ctor.
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 567 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
567 #if defined(OS_CHROMEOS) 568 #if defined(OS_CHROMEOS)
568 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 569 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
569 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 570 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
570 g_browser_process->local_state()); 571 g_browser_process->local_state());
571 } 572 }
572 #endif // defined(OS_CHROMEOS) 573 #endif // defined(OS_CHROMEOS)
573 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 574 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
574 GetPrefs(), g_browser_process->local_state()); 575 GetPrefs(), g_browser_process->local_state());
575 } 576 }
OLDNEW
« no previous file with comments | « blimp/engine/common/blimp_browser_context.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698