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

Side by Side Diff: third_party/oauth2client/multistore_file.py

Issue 1074673002: Add OAuth2 support for end users (i.e. 3-legged flow with the browser). (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: windows lineendings for depot-tools-auth.bat Created 5 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
« no previous file with comments | « third_party/oauth2client/locked_file.py ('k') | third_party/upload.py » ('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 2011 Google Inc. 1 # Copyright 2011 Google Inc.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 __author__ = 'jbeda@google.com (Joe Beda)' 44 __author__ = 'jbeda@google.com (Joe Beda)'
45 45
46 import base64 46 import base64
47 import errno 47 import errno
48 import logging 48 import logging
49 import os 49 import os
50 import threading 50 import threading
51 51
52 from anyjson import simplejson 52 from anyjson import simplejson
53 from oauth2client.client import Storage as BaseStorage 53 from .client import Storage as BaseStorage
54 from oauth2client.client import Credentials 54 from .client import Credentials
55 from oauth2client import util 55 from . import util
56 from locked_file import LockedFile 56 from locked_file import LockedFile
57 57
58 logger = logging.getLogger(__name__) 58 logger = logging.getLogger(__name__)
59 59
60 # A dict from 'filename'->_MultiStore instances 60 # A dict from 'filename'->_MultiStore instances
61 _multistores = {} 61 _multistores = {}
62 _multistores_lock = threading.Lock() 62 _multistores_lock = threading.Lock()
63 63
64 64
65 class Error(Exception): 65 class Error(Exception):
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 456
457 This Storage is a 'view' into the multistore. 457 This Storage is a 'view' into the multistore.
458 458
459 Args: 459 Args:
460 key: The key used to retrieve the credential 460 key: The key used to retrieve the credential
461 461
462 Returns: 462 Returns:
463 A Storage object that can be used to get/set this cred 463 A Storage object that can be used to get/set this cred
464 """ 464 """
465 return self._Storage(self, key) 465 return self._Storage(self, key)
OLDNEW
« no previous file with comments | « third_party/oauth2client/locked_file.py ('k') | third_party/upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698