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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 namespace chromeos { | 47 namespace chromeos { |
48 | 48 |
49 namespace { | 49 namespace { |
50 | 50 |
51 // Increase logging level for Guest mode to avoid LOG(INFO) messages in logs. | 51 // Increase logging level for Guest mode to avoid LOG(INFO) messages in logs. |
52 const char kGuestModeLoggingLevel[] = "1"; | 52 const char kGuestModeLoggingLevel[] = "1"; |
53 | 53 |
54 // Format of command line switch. | 54 // Format of command line switch. |
55 const char kSwitchFormatString[] = " --%s=\"%s\""; | 55 const char kSwitchFormatString[] = " --%s=\"%s\""; |
56 | 56 |
57 // User name which is used in the Guest session. | |
58 const char kGuestUserName[] = ""; | |
59 | |
60 // Derives the new command line from |base_command_line| by doing the following: | 57 // Derives the new command line from |base_command_line| by doing the following: |
61 // - Forward a given switches list to new command; | 58 // - Forward a given switches list to new command; |
62 // - Set start url if given; | 59 // - Set start url if given; |
63 // - Append/override switches using |new_switches|; | 60 // - Append/override switches using |new_switches|; |
64 std::string DeriveCommandLine(const GURL& start_url, | 61 std::string DeriveCommandLine(const GURL& start_url, |
65 const CommandLine& base_command_line, | 62 const CommandLine& base_command_line, |
66 const base::DictionaryValue& new_switches, | 63 const base::DictionaryValue& new_switches, |
67 CommandLine* command_line) { | 64 CommandLine* command_line) { |
68 DCHECK_NE(&base_command_line, command_line); | 65 DCHECK_NE(&base_command_line, command_line); |
69 | 66 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // Relaunch chrome without session manager on dev box. | 361 // Relaunch chrome without session manager on dev box. |
365 ReLaunch(command_line); | 362 ReLaunch(command_line); |
366 return; | 363 return; |
367 } | 364 } |
368 | 365 |
369 // ChromeRestartRequest deletes itself after request sent to session manager. | 366 // ChromeRestartRequest deletes itself after request sent to session manager. |
370 (new ChromeRestartRequest(command_line))->Start(); | 367 (new ChromeRestartRequest(command_line))->Start(); |
371 } | 368 } |
372 | 369 |
373 } // namespace chromeos | 370 } // namespace chromeos |
OLD | NEW |