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

Side by Side Diff: chrome/test/base/testing_profile_manager.cc

Issue 8673003: Revert 111254 - Add GAIA info to profile info cache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « chrome/test/base/testing_profile_manager.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_manager.h" 5 #include "chrome/test/base/testing_profile_manager.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/profiles/profile_info_cache.h" 10 #include "chrome/browser/profiles/profile_info_cache.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 ProfileManager* TestingProfileManager::profile_manager() { 90 ProfileManager* TestingProfileManager::profile_manager() {
91 DCHECK(called_set_up_); 91 DCHECK(called_set_up_);
92 return profile_manager_; 92 return profile_manager_;
93 } 93 }
94 94
95 ProfileInfoCache* TestingProfileManager::profile_info_cache() { 95 ProfileInfoCache* TestingProfileManager::profile_info_cache() {
96 DCHECK(called_set_up_); 96 DCHECK(called_set_up_);
97 return &profile_manager_->GetProfileInfoCache(); 97 return &profile_manager_->GetProfileInfoCache();
98 } 98 }
99 99
100 void TestingProfileManager::DeleteProfileInfoCache() {
101 profile_manager_->profile_info_cache_.reset(NULL);
102 }
103
104 void TestingProfileManager::SetUpInternal() { 100 void TestingProfileManager::SetUpInternal() {
105 ASSERT_FALSE(browser_process_->profile_manager()) 101 ASSERT_FALSE(browser_process_->profile_manager())
106 << "ProfileManager already exists"; 102 << "ProfileManager already exists";
107 103
108 // Set up the directory for profiles. 104 // Set up the directory for profiles.
109 ASSERT_TRUE(profiles_dir_.CreateUniqueTempDir()); 105 ASSERT_TRUE(profiles_dir_.CreateUniqueTempDir());
110 106
111 profile_manager_ = new testing::ProfileManager(profiles_dir_.path()); 107 profile_manager_ = new testing::ProfileManager(profiles_dir_.path());
112 browser_process_->SetProfileManager(profile_manager_); // Takes ownership. 108 browser_process_->SetProfileManager(profile_manager_); // Takes ownership.
113 109
114 called_set_up_ = true; 110 called_set_up_ = true;
115 } 111 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698