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

Unified Diff: tools/android/loading/cloud/backend/google_storage_accessor.py

Issue 1895033002: tools/android/loading Switch the GCE worker to pull queues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@appengine
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: tools/android/loading/cloud/backend/google_storage_accessor.py
diff --git a/tools/android/loading/gce/google_storage_accessor.py b/tools/android/loading/cloud/backend/google_storage_accessor.py
similarity index 91%
rename from tools/android/loading/gce/google_storage_accessor.py
rename to tools/android/loading/cloud/backend/google_storage_accessor.py
index 59c47da3ec04976fa2d1ee6dc428ce11727144df..86e238e8e2f0560c1ee28804a3ebb5423d6649f6 100644
--- a/tools/android/loading/gce/google_storage_accessor.py
+++ b/tools/android/loading/cloud/backend/google_storage_accessor.py
@@ -3,17 +3,16 @@
# found in the LICENSE file.
from gcloud import storage
-from oauth2client.client import GoogleCredentials
class GoogleStorageAccessor(object):
"""Utility class providing helpers for Google Cloud Storage.
"""
- def __init__(self, project_name, bucket_name):
+ def __init__(self, credentials, project_name, bucket_name):
"""project_name is the name of the Google Cloud project.
bucket_name is the name of the bucket that is used for Cloud Storage calls.
"""
- self._credentials = GoogleCredentials.get_application_default()
+ self._credentials = credentials
self._project_name = project_name
self._bucket_name = bucket_name
« no previous file with comments | « tools/android/loading/cloud/backend/deploy.sh ('k') | tools/android/loading/cloud/backend/pip_requirements.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698