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

Side by Side Diff: chrome/browser/password_manager/password_manager_internals_service_unittest.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/password_manager/core/browser/password_manager_internals_se rvice.h" 5 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h"
6 6
7 #include "chrome/test/base/testing_profile.h" 7 #include "chrome/test/base/testing_profile.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h" 8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "components/password_manager/content/browser/password_manager_internals _service_factory.h" 9 #include "components/password_manager/content/browser/password_manager_internals _service_factory.h"
10 #include "components/password_manager/core/browser/log_receiver.h" 10 #include "components/password_manager/core/browser/log_receiver.h"
(...skipping 24 matching lines...) Expand all
35 // During the test cases, the profiles may get created on the same address. To 35 // During the test cases, the profiles may get created on the same address. To
36 // avoid over-zealous asserts we need to mark the newly created one as "live". 36 // avoid over-zealous asserts we need to mark the newly created one as "live".
37 // See declaration of MarkBrowserContextLiveForTesting for more details. 37 // See declaration of MarkBrowserContextLiveForTesting for more details.
38 BrowserContextDependencyManager::GetInstance() 38 BrowserContextDependencyManager::GetInstance()
39 ->MarkBrowserContextLiveForTesting(profile.get()); 39 ->MarkBrowserContextLiveForTesting(profile.get());
40 if (type == INCOGNITO_PROFILE) { 40 if (type == INCOGNITO_PROFILE) {
41 BrowserContextDependencyManager::GetInstance() 41 BrowserContextDependencyManager::GetInstance()
42 ->MarkBrowserContextLiveForTesting(profile->GetOffTheRecordProfile()); 42 ->MarkBrowserContextLiveForTesting(profile->GetOffTheRecordProfile());
43 } 43 }
44 #endif 44 #endif
45 return profile.Pass(); 45 return profile;
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 class PasswordManagerInternalsServiceTest : public testing::Test { 50 class PasswordManagerInternalsServiceTest : public testing::Test {
51 content::TestBrowserThreadBundle thread_bundle_; 51 content::TestBrowserThreadBundle thread_bundle_;
52 }; 52 };
53 53
54 // When the profile is not incognito, it should be possible to activate the 54 // When the profile is not incognito, it should be possible to activate the
55 // service. 55 // service.
(...skipping 23 matching lines...) Expand all
79 79
80 Profile* incognito_profile = profile->GetOffTheRecordProfile(); 80 Profile* incognito_profile = profile->GetOffTheRecordProfile();
81 PasswordManagerInternalsService* service = 81 PasswordManagerInternalsService* service =
82 PasswordManagerInternalsServiceFactory::GetForBrowserContext( 82 PasswordManagerInternalsServiceFactory::GetForBrowserContext(
83 incognito_profile); 83 incognito_profile);
84 // BrowserContextKeyedBaseFactory::GetBrowserContextToUse should return NULL 84 // BrowserContextKeyedBaseFactory::GetBrowserContextToUse should return NULL
85 // for |profile|, because |profile| is incognito. Therefore the returned 85 // for |profile|, because |profile| is incognito. Therefore the returned
86 // |service| should also be NULL. 86 // |service| should also be NULL.
87 EXPECT_FALSE(service); 87 EXPECT_FALSE(service);
88 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698