OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/login/chrome_restart_request.h" | 5 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
6 | 6 |
7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "chrome/browser/chromeos/boot_times_recorder.h" | 25 #include "chrome/browser/chromeos/boot_times_recorder.h" |
26 #include "chrome/browser/lifetime/application_lifetime.h" | 26 #include "chrome/browser/lifetime/application_lifetime.h" |
27 #include "chrome/common/chrome_constants.h" | 27 #include "chrome/common/chrome_constants.h" |
28 #include "chrome/common/chrome_paths.h" | 28 #include "chrome/common/chrome_paths.h" |
29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
30 #include "chrome/common/url_constants.h" | 30 #include "chrome/common/url_constants.h" |
31 #include "chromeos/chromeos_switches.h" | 31 #include "chromeos/chromeos_switches.h" |
32 #include "chromeos/cryptohome/cryptohome_parameters.h" | 32 #include "chromeos/cryptohome/cryptohome_parameters.h" |
33 #include "chromeos/dbus/dbus_thread_manager.h" | 33 #include "chromeos/dbus/dbus_thread_manager.h" |
34 #include "chromeos/dbus/session_manager_client.h" | 34 #include "chromeos/dbus/session_manager_client.h" |
35 #include "chromeos/login/user_names.h" | |
36 #include "components/policy/core/common/policy_switches.h" | 35 #include "components/policy/core/common/policy_switches.h" |
37 #include "components/prefs/json_pref_store.h" | 36 #include "components/prefs/json_pref_store.h" |
38 #include "components/prefs/pref_service.h" | 37 #include "components/prefs/pref_service.h" |
39 #include "components/signin/core/account_id/account_id.h" | 38 #include "components/signin/core/account_id/account_id.h" |
40 #include "components/tracing/common/tracing_switches.h" | 39 #include "components/tracing/common/tracing_switches.h" |
| 40 #include "components/user_manager/user_names.h" |
41 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
42 #include "content/public/common/content_switches.h" | 42 #include "content/public/common/content_switches.h" |
43 #include "gpu/command_buffer/service/gpu_switches.h" | 43 #include "gpu/command_buffer/service/gpu_switches.h" |
44 #include "gpu/ipc/service/switches.h" | 44 #include "gpu/ipc/service/switches.h" |
45 #include "media/base/media_switches.h" | 45 #include "media/base/media_switches.h" |
46 #include "third_party/cros_system_api/switches/chrome_switches.h" | 46 #include "third_party/cros_system_api/switches/chrome_switches.h" |
47 #include "ui/app_list/app_list_switches.h" | 47 #include "ui/app_list/app_list_switches.h" |
48 #include "ui/base/ui_base_switches.h" | 48 #include "ui/base/ui_base_switches.h" |
49 #include "ui/compositor/compositor_switches.h" | 49 #include "ui/compositor/compositor_switches.h" |
50 #include "ui/display/display_switches.h" | 50 #include "ui/display/display_switches.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 void GetOffTheRecordCommandLine(const GURL& start_url, | 353 void GetOffTheRecordCommandLine(const GURL& start_url, |
354 bool is_oobe_completed, | 354 bool is_oobe_completed, |
355 const base::CommandLine& base_command_line, | 355 const base::CommandLine& base_command_line, |
356 base::CommandLine* command_line) { | 356 base::CommandLine* command_line) { |
357 base::DictionaryValue otr_switches; | 357 base::DictionaryValue otr_switches; |
358 otr_switches.SetString(switches::kGuestSession, std::string()); | 358 otr_switches.SetString(switches::kGuestSession, std::string()); |
359 otr_switches.SetString(::switches::kIncognito, std::string()); | 359 otr_switches.SetString(::switches::kIncognito, std::string()); |
360 otr_switches.SetString(::switches::kLoggingLevel, kGuestModeLoggingLevel); | 360 otr_switches.SetString(::switches::kLoggingLevel, kGuestModeLoggingLevel); |
361 otr_switches.SetString( | 361 otr_switches.SetString( |
362 switches::kLoginUser, | 362 switches::kLoginUser, |
363 cryptohome::Identification(login::GuestAccountId()).id()); | 363 cryptohome::Identification(user_manager::GuestAccountId()).id()); |
364 | 364 |
365 // Override the home page. | 365 // Override the home page. |
366 otr_switches.SetString(::switches::kHomePage, | 366 otr_switches.SetString(::switches::kHomePage, |
367 GURL(chrome::kChromeUINewTabURL).spec()); | 367 GURL(chrome::kChromeUINewTabURL).spec()); |
368 | 368 |
369 // If OOBE is not finished yet, lock down the guest session to not allow | 369 // If OOBE is not finished yet, lock down the guest session to not allow |
370 // surfing the web. Guest mode is still useful to inspect logs and run network | 370 // surfing the web. Guest mode is still useful to inspect logs and run network |
371 // diagnostics. | 371 // diagnostics. |
372 if (!is_oobe_completed) | 372 if (!is_oobe_completed) |
373 otr_switches.SetString(switches::kOobeGuestSession, std::string()); | 373 otr_switches.SetString(switches::kOobeGuestSession, std::string()); |
(...skipping 15 matching lines...) Expand all Loading... |
389 // Relaunch chrome without session manager on dev box. | 389 // Relaunch chrome without session manager on dev box. |
390 ReLaunch(command_line); | 390 ReLaunch(command_line); |
391 return; | 391 return; |
392 } | 392 } |
393 | 393 |
394 // ChromeRestartRequest deletes itself after request sent to session manager. | 394 // ChromeRestartRequest deletes itself after request sent to session manager. |
395 (new ChromeRestartRequest(command_line.argv()))->Start(); | 395 (new ChromeRestartRequest(command_line.argv()))->Start(); |
396 } | 396 } |
397 | 397 |
398 } // namespace chromeos | 398 } // namespace chromeos |
OLD | NEW |