OLD | NEW |
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 "base/string_util.h" | 5 #include "base/string_util.h" |
6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/api/identity/experimental_identity_api.h" | 8 #include "chrome/browser/extensions/api/identity/experimental_identity_api.h" |
9 #include "chrome/browser/extensions/api/identity/identity_api.h" | 9 #include "chrome/browser/extensions/api/identity/identity_api.h" |
10 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" | 10 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 break; | 170 break; |
171 } | 171 } |
172 } | 172 } |
173 } | 173 } |
174 | 174 |
175 private: | 175 private: |
176 ResultType result_; | 176 ResultType result_; |
177 OAuth2MintTokenFlow::Delegate* delegate_; | 177 OAuth2MintTokenFlow::Delegate* delegate_; |
178 }; | 178 }; |
179 | 179 |
180 ProfileKeyedService* IdentityAPITestFactory(Profile* profile) { | 180 BrowserContextKeyedService* IdentityAPITestFactory(Profile* profile) { |
181 return new IdentityAPI(profile); | 181 return new IdentityAPI(profile); |
182 } | 182 } |
183 | 183 |
184 } // namespace | 184 } // namespace |
185 | 185 |
186 class ExperimentalMockGetAuthTokenFunction : | 186 class ExperimentalMockGetAuthTokenFunction : |
187 public ExperimentalIdentityGetAuthTokenFunction { | 187 public ExperimentalIdentityGetAuthTokenFunction { |
188 public: | 188 public: |
189 ExperimentalMockGetAuthTokenFunction() | 189 ExperimentalMockGetAuthTokenFunction() |
190 : login_ui_result_(true), | 190 : login_ui_result_(true), |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 "https://abcdefghij.chromiumapp.org/callback#test')</script>\"}]", | 724 "https://abcdefghij.chromiumapp.org/callback#test')</script>\"}]", |
725 browser())); | 725 browser())); |
726 | 726 |
727 std::string url; | 727 std::string url; |
728 EXPECT_TRUE(value->GetAsString(&url)); | 728 EXPECT_TRUE(value->GetAsString(&url)); |
729 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), | 729 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), |
730 url); | 730 url); |
731 } | 731 } |
732 | 732 |
733 } // namespace extensions | 733 } // namespace extensions |
OLD | NEW |