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

Side by Side Diff: chrome/browser/invalidation/ticl_profile_settings_provider.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 5 years, 12 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
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/invalidation/ticl_profile_settings_provider.h" 5 #include "chrome/browser/invalidation/ticl_profile_settings_provider.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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 25 matching lines...) Expand all
36 // Do not try to use GCM channel if GCM is disabled. 36 // Do not try to use GCM channel if GCM is disabled.
37 return false; 37 return false;
38 } 38 }
39 39
40 if (profile_->GetPrefs()->GetBoolean( 40 if (profile_->GetPrefs()->GetBoolean(
41 prefs::kInvalidationServiceUseGCMChannel)) { 41 prefs::kInvalidationServiceUseGCMChannel)) {
42 // Use GCM channel if it was enabled via prefs. 42 // Use GCM channel if it was enabled via prefs.
43 return true; 43 return true;
44 } 44 }
45 45
46 if (CommandLine::ForCurrentProcess()->HasSwitch( 46 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
47 switches::kInvalidationUseGCMChannel)) { 47 switches::kInvalidationUseGCMChannel)) {
48 // Use GCM channel if it was enabled via a command-line switch. 48 // Use GCM channel if it was enabled via a command-line switch.
49 return true; 49 return true;
50 } 50 }
51 51
52 // By default, do not use GCM channel. 52 // By default, do not use GCM channel.
53 return false; 53 return false;
54 } 54 }
55 55
56 } // namespace invalidation 56 } // namespace invalidation
OLDNEW
« no previous file with comments | « chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698