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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // also shared between the incognito Profile and the original Profile. 109 // also shared between the incognito Profile and the original Profile.
110 ManagerMap::const_iterator it = managers_.find(profile->GetOriginalProfile()); 110 ManagerMap::const_iterator it = managers_.find(profile->GetOriginalProfile());
111 return it != managers_.end() ? it->second : NULL; 111 return it != managers_.end() ? it->second : NULL;
112 } 112 }
113 113
114 scoped_ptr<UserCloudPolicyManagerChromeOS> 114 scoped_ptr<UserCloudPolicyManagerChromeOS>
115 UserCloudPolicyManagerFactoryChromeOS::CreateManagerForProfile( 115 UserCloudPolicyManagerFactoryChromeOS::CreateManagerForProfile(
116 Profile* profile, 116 Profile* profile,
117 bool force_immediate_load, 117 bool force_immediate_load,
118 scoped_refptr<base::SequencedTaskRunner> background_task_runner) { 118 scoped_refptr<base::SequencedTaskRunner> background_task_runner) {
119 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 119 const base::CommandLine* command_line =
120 base::CommandLine::ForCurrentProcess();
120 // Don't initialize cloud policy for the signin profile. 121 // Don't initialize cloud policy for the signin profile.
121 if (chromeos::ProfileHelper::IsSigninProfile(profile)) 122 if (chromeos::ProfileHelper::IsSigninProfile(profile))
122 return scoped_ptr<UserCloudPolicyManagerChromeOS>(); 123 return scoped_ptr<UserCloudPolicyManagerChromeOS>();
123 124
124 // |user| should never be NULL except for the signin profile. This object is 125 // |user| should never be NULL except for the signin profile. This object is
125 // created as part of the Profile creation, which happens right after 126 // created as part of the Profile creation, which happens right after
126 // sign-in. The just-signed-in User is the active user during that time. 127 // sign-in. The just-signed-in User is the active user during that time.
127 user_manager::User* user = 128 user_manager::User* user =
128 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 129 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
129 CHECK(user); 130 CHECK(user);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 252
252 bool UserCloudPolicyManagerFactoryChromeOS::HasTestingFactory( 253 bool UserCloudPolicyManagerFactoryChromeOS::HasTestingFactory(
253 content::BrowserContext* context) { 254 content::BrowserContext* context) {
254 return false; 255 return false;
255 } 256 }
256 257
257 void UserCloudPolicyManagerFactoryChromeOS::CreateServiceNow( 258 void UserCloudPolicyManagerFactoryChromeOS::CreateServiceNow(
258 content::BrowserContext* context) {} 259 content::BrowserContext* context) {}
259 260
260 } // namespace policy 261 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698