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 "chrome/test/base/testing_profile.h" | 5 #include "chrome/test/base/testing_profile.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 bool TestingProfile::IsGuestSession() const { | 831 bool TestingProfile::IsGuestSession() const { |
832 return false; | 832 return false; |
833 } | 833 } |
834 | 834 |
835 Profile::ExitType TestingProfile::GetLastSessionExitType() { | 835 Profile::ExitType TestingProfile::GetLastSessionExitType() { |
836 return last_session_exited_cleanly_ ? EXIT_NORMAL : EXIT_CRASHED; | 836 return last_session_exited_cleanly_ ? EXIT_NORMAL : EXIT_CRASHED; |
837 } | 837 } |
838 | 838 |
839 #if defined(OS_CHROMEOS) | 839 #if defined(OS_CHROMEOS) |
840 bool TestingProfile::IsLoginProfile() { | 840 bool TestingProfile::IsLoginProfile() { |
841 return false; | 841 return profile_path_.BaseName().value() == chrome::kInitialProfile; |
842 } | 842 } |
843 #endif | 843 #endif |
844 | 844 |
845 TestingProfile::Builder::Builder() | 845 TestingProfile::Builder::Builder() |
846 : build_called_(false), | 846 : build_called_(false), |
847 delegate_(NULL), | 847 delegate_(NULL), |
848 incognito_(false) { | 848 incognito_(false) { |
849 } | 849 } |
850 | 850 |
851 TestingProfile::Builder::~Builder() { | 851 TestingProfile::Builder::~Builder() { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 | 890 |
891 return scoped_ptr<TestingProfile>(new TestingProfile( | 891 return scoped_ptr<TestingProfile>(new TestingProfile( |
892 path_, | 892 path_, |
893 delegate_, | 893 delegate_, |
894 extension_policy_, | 894 extension_policy_, |
895 pref_service_.Pass(), | 895 pref_service_.Pass(), |
896 incognito_, | 896 incognito_, |
897 managed_user_id_, | 897 managed_user_id_, |
898 testing_factories_)); | 898 testing_factories_)); |
899 } | 899 } |
OLD | NEW |