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

Side by Side Diff: chrome/browser/background/background_mode_manager.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) 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // static 196 // static
197 bool BackgroundModeManager::BackgroundModeData::BackgroundModeDataCompare( 197 bool BackgroundModeManager::BackgroundModeData::BackgroundModeDataCompare(
198 const BackgroundModeData* bmd1, 198 const BackgroundModeData* bmd1,
199 const BackgroundModeData* bmd2) { 199 const BackgroundModeData* bmd2) {
200 return bmd1->name_ < bmd2->name_; 200 return bmd1->name_ < bmd2->name_;
201 } 201 }
202 202
203 203
204 /////////////////////////////////////////////////////////////////////////////// 204 ///////////////////////////////////////////////////////////////////////////////
205 // BackgroundModeManager, public 205 // BackgroundModeManager, public
206 BackgroundModeManager::BackgroundModeManager( 206 BackgroundModeManager::BackgroundModeManager(base::CommandLine* command_line,
207 CommandLine* command_line, 207 ProfileInfoCache* profile_cache)
208 ProfileInfoCache* profile_cache)
209 : profile_cache_(profile_cache), 208 : profile_cache_(profile_cache),
210 status_tray_(NULL), 209 status_tray_(NULL),
211 status_icon_(NULL), 210 status_icon_(NULL),
212 context_menu_(NULL), 211 context_menu_(NULL),
213 in_background_mode_(false), 212 in_background_mode_(false),
214 keep_alive_for_startup_(false), 213 keep_alive_for_startup_(false),
215 keep_alive_for_test_(false), 214 keep_alive_for_test_(false),
216 background_mode_suspended_(false), 215 background_mode_suspended_(false),
217 keeping_alive_(false) { 216 keeping_alive_(false) {
218 // We should never start up if there is no browser process or if we are 217 // We should never start up if there is no browser process or if we are
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 } 857 }
859 } 858 }
860 return profile_it; 859 return profile_it;
861 } 860 }
862 861
863 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { 862 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const {
864 PrefService* service = g_browser_process->local_state(); 863 PrefService* service = g_browser_process->local_state();
865 DCHECK(service); 864 DCHECK(service);
866 return service->GetBoolean(prefs::kBackgroundModeEnabled); 865 return service->GetBoolean(prefs::kBackgroundModeEnabled);
867 } 866 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698