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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.cc

Issue 252653002: Rename (Chrome)SyncExtensionFunction::RunImpl to RunSync so that the RunImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months 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) 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 "chrome/browser/extensions/api/identity/identity_api.h" 5 #include "chrome/browser/extensions/api/identity/identity_api.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 return client_id; 682 return client_id;
683 } 683 }
684 684
685 IdentityRemoveCachedAuthTokenFunction::IdentityRemoveCachedAuthTokenFunction() { 685 IdentityRemoveCachedAuthTokenFunction::IdentityRemoveCachedAuthTokenFunction() {
686 } 686 }
687 687
688 IdentityRemoveCachedAuthTokenFunction:: 688 IdentityRemoveCachedAuthTokenFunction::
689 ~IdentityRemoveCachedAuthTokenFunction() { 689 ~IdentityRemoveCachedAuthTokenFunction() {
690 } 690 }
691 691
692 bool IdentityRemoveCachedAuthTokenFunction::RunImpl() { 692 bool IdentityRemoveCachedAuthTokenFunction::RunSync() {
693 if (GetProfile()->IsOffTheRecord()) { 693 if (GetProfile()->IsOffTheRecord()) {
694 error_ = identity_constants::kOffTheRecord; 694 error_ = identity_constants::kOffTheRecord;
695 return false; 695 return false;
696 } 696 }
697 697
698 scoped_ptr<identity::RemoveCachedAuthToken::Params> params( 698 scoped_ptr<identity::RemoveCachedAuthToken::Params> params(
699 identity::RemoveCachedAuthToken::Params::Create(*args_)); 699 identity::RemoveCachedAuthToken::Params::Create(*args_));
700 EXTENSION_FUNCTION_VALIDATE(params.get()); 700 EXTENSION_FUNCTION_VALIDATE(params.get());
701 IdentityAPI::GetFactoryInstance()->Get(GetProfile())->EraseCachedToken( 701 IdentityAPI::GetFactoryInstance()->Get(GetProfile())->EraseCachedToken(
702 GetExtension()->id(), params->details.token); 702 GetExtension()->id(), params->details.token);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange( 773 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange(
774 const GURL& redirect_url) { 774 const GURL& redirect_url) {
775 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { 775 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) {
776 SetResult(new base::StringValue(redirect_url.spec())); 776 SetResult(new base::StringValue(redirect_url.spec()));
777 SendResponse(true); 777 SendResponse(true);
778 Release(); // Balanced in RunImpl. 778 Release(); // Balanced in RunImpl.
779 } 779 }
780 } 780 }
781 781
782 } // namespace extensions 782 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698