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

Side by Side Diff: chrome/browser/profiles/profile_manager_browsertest.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl 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
« no previous file with comments | « chrome/browser/platform_util_chromeos.cc ('k') | chrome/browser/profiles/profile_metrics.cc » ('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 (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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 Profile* profile, 48 Profile* profile,
49 Profile::CreateStatus status) { 49 Profile::CreateStatus status) {
50 if (status == Profile::CREATE_STATUS_INITIALIZED) 50 if (status == Profile::CREATE_STATUS_INITIALIZED)
51 run_loop->Quit(); 51 run_loop->Quit();
52 } 52 }
53 53
54 void ProfileCreationComplete(Profile* profile, Profile::CreateStatus status) { 54 void ProfileCreationComplete(Profile* profile, Profile::CreateStatus status) {
55 ASSERT_NE(status, Profile::CREATE_STATUS_LOCAL_FAIL); 55 ASSERT_NE(status, Profile::CREATE_STATUS_LOCAL_FAIL);
56 ASSERT_NE(status, Profile::CREATE_STATUS_REMOTE_FAIL); 56 ASSERT_NE(status, Profile::CREATE_STATUS_REMOTE_FAIL);
57 // No browser should have been created for this profile yet. 57 // No browser should have been created for this profile yet.
58 EXPECT_EQ(chrome::GetTotalBrowserCountForProfile(profile), 0U); 58 EXPECT_EQ(chrome::GetBrowserCount(profile), 0U);
59 EXPECT_EQ(chrome::GetTotalBrowserCount(), 1U); 59 EXPECT_EQ(chrome::GetTotalBrowserCount(), 1U);
60 if (status == Profile::CREATE_STATUS_INITIALIZED) 60 if (status == Profile::CREATE_STATUS_INITIALIZED)
61 base::MessageLoop::current()->QuitWhenIdle(); 61 base::MessageLoop::current()->QuitWhenIdle();
62 } 62 }
63 63
64 void EphemeralProfileCreationComplete(Profile* profile, 64 void EphemeralProfileCreationComplete(Profile* profile,
65 Profile::CreateStatus status) { 65 Profile::CreateStatus status) {
66 if (status == Profile::CREATE_STATUS_INITIALIZED) 66 if (status == Profile::CREATE_STATUS_INITIALIZED)
67 profile->GetPrefs()->SetBoolean(prefs::kForceEphemeralProfiles, true); 67 profile->GetPrefs()->SetBoolean(prefs::kForceEphemeralProfiles, true);
68 ProfileCreationComplete(profile, status); 68 ProfileCreationComplete(profile, status);
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 ASSERT_TRUE(profile_manager->IsValidProfile(incognito_profile)); 487 ASSERT_TRUE(profile_manager->IsValidProfile(incognito_profile));
488 EXPECT_EQ(initial_profile_count, profile_manager->GetNumberOfProfiles()); 488 EXPECT_EQ(initial_profile_count, profile_manager->GetNumberOfProfiles());
489 489
490 // Delete the incognito profile. 490 // Delete the incognito profile.
491 incognito_profile->GetOriginalProfile()->DestroyOffTheRecordProfile(); 491 incognito_profile->GetOriginalProfile()->DestroyOffTheRecordProfile();
492 492
493 EXPECT_FALSE(profile->HasOffTheRecordProfile()); 493 EXPECT_FALSE(profile->HasOffTheRecordProfile());
494 EXPECT_FALSE(profile_manager->IsValidProfile(incognito_profile)); 494 EXPECT_FALSE(profile_manager->IsValidProfile(incognito_profile));
495 EXPECT_EQ(initial_profile_count, profile_manager->GetNumberOfProfiles()); 495 EXPECT_EQ(initial_profile_count, profile_manager->GetNumberOfProfiles());
496 } 496 }
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_chromeos.cc ('k') | chrome/browser/profiles/profile_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698