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

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

Issue 1731483003: chrome: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // to live any time they are returned. 114 // to live any time they are returned.
115 time_to_live -= base::TimeDelta::FromMinutes(20); 115 time_to_live -= base::TimeDelta::FromMinutes(20);
116 116
117 base::TimeDelta zero_delta; 117 base::TimeDelta zero_delta;
118 if (time_to_live < zero_delta) 118 if (time_to_live < zero_delta)
119 time_to_live = zero_delta; 119 time_to_live = zero_delta;
120 120
121 expiration_time_ = base::Time::Now() + time_to_live; 121 expiration_time_ = base::Time::Now() + time_to_live;
122 } 122 }
123 123
124 IdentityTokenCacheValue::IdentityTokenCacheValue(
125 const IdentityTokenCacheValue& other) = default;
126
124 IdentityTokenCacheValue::~IdentityTokenCacheValue() {} 127 IdentityTokenCacheValue::~IdentityTokenCacheValue() {}
125 128
126 IdentityTokenCacheValue::CacheValueStatus IdentityTokenCacheValue::status() 129 IdentityTokenCacheValue::CacheValueStatus IdentityTokenCacheValue::status()
127 const { 130 const {
128 if (is_expired()) 131 if (is_expired())
129 return IdentityTokenCacheValue::CACHE_STATUS_NOTFOUND; 132 return IdentityTokenCacheValue::CACHE_STATUS_NOTFOUND;
130 else 133 else
131 return status_; 134 return status_;
132 } 135 }
133 136
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { 1014 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) {
1012 SetResult(new base::StringValue(redirect_url.spec())); 1015 SetResult(new base::StringValue(redirect_url.spec()));
1013 SendResponse(true); 1016 SendResponse(true);
1014 if (auth_flow_) 1017 if (auth_flow_)
1015 auth_flow_.release()->DetachDelegateAndDelete(); 1018 auth_flow_.release()->DetachDelegateAndDelete();
1016 Release(); // Balanced in RunAsync. 1019 Release(); // Balanced in RunAsync.
1017 } 1020 }
1018 } 1021 }
1019 1022
1020 } // namespace extensions 1023 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698