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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 8509037: Revert 109826 - Re-authenticate oauth tokens after crash and restart Sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 browser::ShowLoginWizard(first_screen, size); 543 browser::ShowLoginWizard(first_screen, size);
544 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && 544 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) &&
545 parsed_command_line.HasSwitch(switches::kLoginPassword)) { 545 parsed_command_line.HasSwitch(switches::kLoginPassword)) {
546 chromeos::BootTimesLoader::Get()->RecordLoginAttempted(); 546 chromeos::BootTimesLoader::Get()->RecordLoginAttempted();
547 new StubLogin( 547 new StubLogin(
548 parsed_command_line.GetSwitchValueASCII(switches::kLoginUser), 548 parsed_command_line.GetSwitchValueASCII(switches::kLoginUser),
549 parsed_command_line.GetSwitchValueASCII(switches::kLoginPassword)); 549 parsed_command_line.GetSwitchValueASCII(switches::kLoginPassword));
550 } else { 550 } else {
551 // We did not log in (we crashed or are debugging), so we need to 551 // We did not log in (we crashed or are debugging), so we need to
552 // set the user name for sync. 552 // set the user name for sync.
553 chromeos::LoginUtils::Get()->RestoreAuthenticationSession( 553 profile->GetProfileSyncService(
554 chromeos::UserManager::Get()->logged_in_user().email(), profile); 554 chromeos::UserManager::Get()->logged_in_user().email());
555 } 555 }
556 } 556 }
557 557
558 #else 558 #else
559 559
560 void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line, 560 void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line,
561 Profile* profile) { 561 Profile* profile) {
562 // Dummy empty function for non-ChromeOS builds to avoid extra ifdefs below. 562 // Dummy empty function for non-ChromeOS builds to avoid extra ifdefs below.
563 } 563 }
564 564
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2084 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2085 (pre_read == "0" || pre_read == "1")) { 2085 (pre_read == "0" || pre_read == "1")) {
2086 std::string uma_name(name); 2086 std::string uma_name(name);
2087 uma_name += "_PreRead"; 2087 uma_name += "_PreRead";
2088 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2088 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2089 AddPreReadHistogramTime(uma_name.c_str(), time); 2089 AddPreReadHistogramTime(uma_name.c_str(), time);
2090 } 2090 }
2091 #endif 2091 #endif
2092 #endif 2092 #endif
2093 } 2093 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698