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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_misc.h

Issue 23549016: [Files.app] Fetch and use CWS OAuth token instead of Drive token in Suggest app dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test failure. Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc » ('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 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 // This file provides miscellaneous API functions, which don't belong to 5 // This file provides miscellaneous API functions, which don't belong to
6 // other files. 6 // other files.
7 7
8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ 8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_
9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ 9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_
10 10
11 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" 11 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
12 #include "chrome/browser/chromeos/file_manager/zip_file_creator.h" 12 #include "chrome/browser/chromeos/file_manager/zip_file_creator.h"
13 #include "chrome/browser/google_apis/gdata_errorcode.h"
14
15 namespace google_apis {
16 class AuthServiceInterface;
17 }
13 18
14 namespace extensions { 19 namespace extensions {
15 20
16 // Implements the chrome.fileBrowserPrivate.logoutUser method. 21 // Implements the chrome.fileBrowserPrivate.logoutUser method.
17 class FileBrowserPrivateLogoutUserFunction : public SyncExtensionFunction { 22 class FileBrowserPrivateLogoutUserFunction : public SyncExtensionFunction {
18 public: 23 public:
19 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.logoutUser", 24 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.logoutUser",
20 FILEBROWSERPRIVATE_LOGOUTUSER) 25 FILEBROWSERPRIVATE_LOGOUTUSER)
21 26
22 FileBrowserPrivateLogoutUserFunction(); 27 FileBrowserPrivateLogoutUserFunction();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 114
110 protected: 115 protected:
111 virtual ~FileBrowserPrivateInstallWebstoreItemFunction(); 116 virtual ~FileBrowserPrivateInstallWebstoreItemFunction();
112 virtual bool RunImpl() OVERRIDE; 117 virtual bool RunImpl() OVERRIDE;
113 void OnInstallComplete(bool success, const std::string& error); 118 void OnInstallComplete(bool success, const std::string& error);
114 119
115 private: 120 private:
116 std::string webstore_item_id_; 121 std::string webstore_item_id_;
117 }; 122 };
118 123
124 class FileBrowserPrivateRequestWebStoreAccessTokenFunction
125 : public LoggedAsyncExtensionFunction {
126 public:
127 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.requestWebStoreAccessToken",
128 FILEBROWSERPRIVATE_REQUESTWEBSTOREACCESSTOKEN);
129
130 FileBrowserPrivateRequestWebStoreAccessTokenFunction();
131
132 protected:
133 virtual ~FileBrowserPrivateRequestWebStoreAccessTokenFunction();
134 virtual bool RunImpl() OVERRIDE;
135
136 private:
137 scoped_ptr<google_apis::AuthServiceInterface> auth_service_;
138
139 void OnAccessTokenFetched(google_apis::GDataErrorCode code,
140 const std::string& access_token);
141
142 };
143
119 } // namespace extensions 144 } // namespace extensions
120 145
121 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ 146 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698