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

Side by Side Diff: chrome/browser/ui/webui/identity_internals/identity_internals_ui_browsertest.cc

Issue 365513002: Port identity_internals to mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT for commit Created 6 years, 4 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
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 #include "chrome/browser/ui/webui/identity_internals_ui_browsertest.h" 5 #include "chrome/browser/ui/webui/identity_internals/identity_internals_ui_brows ertest.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "chrome/browser/extensions/api/identity/extension_token_key.h" 9 #include "chrome/browser/extensions/api/identity/extension_token_key.h"
10 #include "chrome/browser/extensions/api/identity/identity_api.h" 10 #include "chrome/browser/extensions/api/identity/identity_api.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 13
14 namespace { 14 namespace {
15 15
16 const char kChromeWebStoreId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; 16 const char kChromeWebStoreId[] = "ahfgeienlihckogmohjhadlkjgocpleb";
17 const int kOneHour = 3600; 17 const int kOneHour = 3600;
18
18 } // namespace 19 } // namespace
19 20
20 IdentityInternalsUIBrowserTest::IdentityInternalsUIBrowserTest() {} 21 IdentityInternalsUIBrowserTest::IdentityInternalsUIBrowserTest() {}
21 22
22 IdentityInternalsUIBrowserTest::~IdentityInternalsUIBrowserTest() {} 23 IdentityInternalsUIBrowserTest::~IdentityInternalsUIBrowserTest() {}
23 24
24 void IdentityInternalsUIBrowserTest::SetupTokenCache(int number_of_tokens) { 25 void IdentityInternalsUIBrowserTest::SetupTokenCache(int number_of_tokens) {
25 for (int number = 0; number < number_of_tokens; ++number) { 26 for (int number = 0; number < number_of_tokens; ++number) {
26 const std::string token_number = base::IntToString(number); 27 const std::string token_number = base::IntToString(number);
27 std::string token_id("token"); 28 std::string token_id("token");
(...skipping 23 matching lines...) Expand all
51 extensions::IdentityTokenCacheValue(token_id, 52 extensions::IdentityTokenCacheValue(token_id,
52 base::TimeDelta::FromSeconds(time_to_live)); 53 base::TimeDelta::FromSeconds(time_to_live));
53 extensions::ExtensionTokenKey key( 54 extensions::ExtensionTokenKey key(
54 extension_id, 55 extension_id,
55 "test@example.com", 56 "test@example.com",
56 std::set<std::string>(scopes.begin(), scopes.end())); 57 std::set<std::string>(scopes.begin(), scopes.end()));
57 extensions::IdentityAPI::GetFactoryInstance() 58 extensions::IdentityAPI::GetFactoryInstance()
58 ->Get(browser()->profile()) 59 ->Get(browser()->profile())
59 ->SetCachedToken(key, token_cache_value); 60 ->SetCachedToken(key, token_cache_value);
60 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698