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

Side by Side Diff: trunk/src/chrome/browser/policy/cloud/user_policy_signin_service.cc

Issue 15968002: Revert 201837 "OOP import on Windows." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 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
Property Changes:
Deleted: svn:mergeinfo
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/policy/cloud/user_policy_signin_service.h" 5 #include "chrome/browser/policy/cloud/user_policy_signin_service.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 policy::CloudPolicyClient* client) { 219 policy::CloudPolicyClient* client) {
220 DVLOG(1) << "Client registration failed"; 220 DVLOG(1) << "Client registration failed";
221 DCHECK_EQ(client, client_); 221 DCHECK_EQ(client, client_);
222 RequestCompleted(); 222 RequestCompleted();
223 } 223 }
224 224
225 UserPolicySigninService::UserPolicySigninService( 225 UserPolicySigninService::UserPolicySigninService(
226 Profile* profile) 226 Profile* profile)
227 : profile_(profile), 227 : profile_(profile),
228 weak_factory_(this) { 228 weak_factory_(this) {
229 if (profile_->GetPrefs()->GetBoolean(prefs::kDisableCloudPolicyOnSignin)) 229 CommandLine* cmd_line = CommandLine::ForCurrentProcess();
230 if (profile_->GetPrefs()->GetBoolean(prefs::kDisableCloudPolicyOnSignin) ||
231 ProfileManager::IsImportProcess(*cmd_line)) {
230 return; 232 return;
233 }
231 234
232 // Initialize/shutdown the UserCloudPolicyManager when the user signs out. 235 // Initialize/shutdown the UserCloudPolicyManager when the user signs out.
233 registrar_.Add(this, 236 registrar_.Add(this,
234 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, 237 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
235 content::Source<Profile>(profile)); 238 content::Source<Profile>(profile));
236 239
237 // Listen for an OAuth token to become available so we can register a client 240 // Listen for an OAuth token to become available so we can register a client
238 // if for some reason the client is not already registered (for example, if 241 // if for some reason the client is not already registered (for example, if
239 // the policy load failed during initial signin). 242 // the policy load failed during initial signin).
240 registrar_.Add(this, 243 registrar_.Add(this,
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // before UserCloudPolicyManager shuts down the CloudPolicyClient. 585 // before UserCloudPolicyManager shuts down the CloudPolicyClient.
583 registration_helper_.reset(); 586 registration_helper_.reset();
584 StopObserving(); 587 StopObserving();
585 } 588 }
586 589
587 UserCloudPolicyManager* UserPolicySigninService::GetManager() { 590 UserCloudPolicyManager* UserPolicySigninService::GetManager() {
588 return UserCloudPolicyManagerFactory::GetForProfile(profile_); 591 return UserCloudPolicyManagerFactory::GetForProfile(profile_);
589 } 592 }
590 593
591 } // namespace policy 594 } // namespace policy
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/importer/ie_importer_browsertest_win.cc ('k') | trunk/src/chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698