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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 8783001: Fix the sync sign in dialog issues for app notifications: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
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/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 break; 1469 break;
1470 } 1470 }
1471 case chrome::NOTIFICATION_TOKEN_AVAILABLE: { 1471 case chrome::NOTIFICATION_TOKEN_AVAILABLE: {
1472 const TokenService::TokenAvailableDetails& token_details = 1472 const TokenService::TokenAvailableDetails& token_details =
1473 *(content::Details<const TokenService::TokenAvailableDetails>( 1473 *(content::Details<const TokenService::TokenAvailableDetails>(
1474 details).ptr()); 1474 details).ptr());
1475 if (IsTokenServiceRelevant(token_details.service()) && 1475 if (IsTokenServiceRelevant(token_details.service()) &&
1476 AreCredentialsAvailable(true)) { 1476 AreCredentialsAvailable(true)) {
1477 if (backend_initialized_) { 1477 if (backend_initialized_) {
1478 backend_->UpdateCredentials(GetCredentials()); 1478 backend_->UpdateCredentials(GetCredentials());
1479 const GoogleServiceAuthError& last_error = GetAuthError();
Andrew T Wilson (Slow) 2011/12/02 21:55:41 Add a comment to explain why this needs to happen.
Munjal (Google) 2011/12/03 01:25:33 Done.
1480 if (GoogleServiceAuthError::NONE == last_error.state())
1481 OnAuthError();
1479 } 1482 }
1480 if (!sync_prefs_.IsStartSuppressed()) 1483 if (!sync_prefs_.IsStartSuppressed())
1481 StartUp(); 1484 StartUp();
1482 } 1485 }
1483 break; 1486 break;
1484 } 1487 }
1485 case chrome::NOTIFICATION_TOKEN_LOADING_FINISHED: { 1488 case chrome::NOTIFICATION_TOKEN_LOADING_FINISHED: {
1486 // This notification gets fired when TokenService loads the tokens 1489 // This notification gets fired when TokenService loads the tokens
1487 // from storage. Here we only check if the chromiumsync token is 1490 // from storage. Here we only check if the chromiumsync token is
1488 // available (versus both chromiumsync and oauth login tokens) to 1491 // available (versus both chromiumsync and oauth login tokens) to
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 << "Unrecoverable error."; 1596 << "Unrecoverable error.";
1594 } else { 1597 } else {
1595 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " 1598 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not "
1596 << "initialized"; 1599 << "initialized";
1597 } 1600 }
1598 } 1601 }
1599 1602
1600 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { 1603 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() {
1601 return failed_datatypes_handler_; 1604 return failed_datatypes_handler_;
1602 } 1605 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698