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

Side by Side Diff: chrome/browser/sessions/better_session_restore_browsertest.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 (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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return new net::URLRequestTestJob( 95 return new net::URLRequestTestJob(
96 request, network_delegate, net::URLRequestTestJob::test_headers(), 96 request, network_delegate, net::URLRequestTestJob::test_headers(),
97 "<html><head><title>PASS</title></head><body>Data posted</body></html>", 97 "<html><head><title>PASS</title></head><body>Data posted</body></html>",
98 true); 98 true);
99 } 99 }
100 100
101 class FakeBackgroundModeManager : public BackgroundModeManager { 101 class FakeBackgroundModeManager : public BackgroundModeManager {
102 public: 102 public:
103 FakeBackgroundModeManager() 103 FakeBackgroundModeManager()
104 : BackgroundModeManager( 104 : BackgroundModeManager(
105 CommandLine::ForCurrentProcess(), 105 base::CommandLine::ForCurrentProcess(),
106 &g_browser_process->profile_manager()->GetProfileInfoCache()), 106 &g_browser_process->profile_manager()->GetProfileInfoCache()),
107 background_mode_active_(false) {} 107 background_mode_active_(false) {}
108 108
109 void SetBackgroundModeActive(bool active) { 109 void SetBackgroundModeActive(bool active) {
110 background_mode_active_ = active; 110 background_mode_active_ = active;
111 } 111 }
112 112
113 bool IsBackgroundModeActive() override { return background_mode_active_; } 113 bool IsBackgroundModeActive() override { return background_mode_active_; }
114 114
115 private: 115 private:
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 CookieSettings::Factory::GetForProfile(new_browser->profile())-> 836 CookieSettings::Factory::GetForProfile(new_browser->profile())->
837 SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); 837 SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY);
838 // ... even if background mode is active. 838 // ... even if background mode is active.
839 EnableBackgroundMode(); 839 EnableBackgroundMode();
840 new_browser = QuitBrowserAndRestore(new_browser, true); 840 new_browser = QuitBrowserAndRestore(new_browser, true);
841 StoreDataWithPage(new_browser, "cookies.html"); 841 StoreDataWithPage(new_browser, "cookies.html");
842 DisableBackgroundMode(); 842 DisableBackgroundMode();
843 new_browser = QuitBrowserAndRestore(new_browser, true); 843 new_browser = QuitBrowserAndRestore(new_browser, true);
844 StoreDataWithPage(new_browser, "cookies.html"); 844 StoreDataWithPage(new_browser, "cookies.html");
845 } 845 }
OLDNEW
« no previous file with comments | « chrome/browser/services/gcm/push_messaging_service_impl.cc ('k') | chrome/browser/sessions/session_data_deleter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698