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

Side by Side Diff: chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc

Issue 816403003: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_mobile.h" 5 #include "chrome/browser/policy/cloud/user_policy_signin_service_mobile.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 11 matching lines...) Expand all
22 #include "components/signin/core/browser/signin_manager.h" 22 #include "components/signin/core/browser/signin_manager.h"
23 #include "net/base/network_change_notifier.h" 23 #include "net/base/network_change_notifier.h"
24 #include "net/url_request/url_request_context_getter.h" 24 #include "net/url_request/url_request_context_getter.h"
25 #include "policy/proto/device_management_backend.pb.h" 25 #include "policy/proto/device_management_backend.pb.h"
26 26
27 namespace policy { 27 namespace policy {
28 28
29 namespace { 29 namespace {
30 30
31 enterprise_management::DeviceRegisterRequest::Type GetRegistrationType() { 31 enterprise_management::DeviceRegisterRequest::Type GetRegistrationType() {
32 CommandLine* command_line = CommandLine::ForCurrentProcess(); 32 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
33 if (command_line->HasSwitch(switches::kFakeCloudPolicyType)) 33 if (command_line->HasSwitch(switches::kFakeCloudPolicyType))
34 return enterprise_management::DeviceRegisterRequest::BROWSER; 34 return enterprise_management::DeviceRegisterRequest::BROWSER;
35 #if defined(OS_IOS) 35 #if defined(OS_IOS)
36 return enterprise_management::DeviceRegisterRequest::IOS_BROWSER; 36 return enterprise_management::DeviceRegisterRequest::IOS_BROWSER;
37 #elif defined(OS_ANDROID) 37 #elif defined(OS_ANDROID)
38 return enterprise_management::DeviceRegisterRequest::ANDROID_BROWSER; 38 return enterprise_management::DeviceRegisterRequest::ANDROID_BROWSER;
39 #else 39 #else
40 #error "This file can be built only on OS_IOS or OS_ANDROID." 40 #error "This file can be built only on OS_IOS or OS_ANDROID."
41 #endif 41 #endif
42 } 42 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 void UserPolicySigninService::CancelPendingRegistration() { 214 void UserPolicySigninService::CancelPendingRegistration() {
215 weak_factory_.InvalidateWeakPtrs(); 215 weak_factory_.InvalidateWeakPtrs();
216 } 216 }
217 217
218 void UserPolicySigninService::OnRegistrationDone() { 218 void UserPolicySigninService::OnRegistrationDone() {
219 registration_helper_.reset(); 219 registration_helper_.reset();
220 } 220 }
221 221
222 } // namespace policy 222 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698