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

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

Issue 8587023: Add GAIA info to profile info cache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix leak Created 9 years 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
100 void TestingProfileManager::SetUpInternal() { 104 void TestingProfileManager::SetUpInternal() {
101 ASSERT_FALSE(browser_process_->profile_manager()) 105 ASSERT_FALSE(browser_process_->profile_manager())
102 << "ProfileManager already exists"; 106 << "ProfileManager already exists";
103 107
104 // Set up the directory for profiles. 108 // Set up the directory for profiles.
105 ASSERT_TRUE(profiles_dir_.CreateUniqueTempDir()); 109 ASSERT_TRUE(profiles_dir_.CreateUniqueTempDir());
106 110
107 profile_manager_ = new testing::ProfileManager(profiles_dir_.path()); 111 profile_manager_ = new testing::ProfileManager(profiles_dir_.path());
108 browser_process_->SetProfileManager(profile_manager_); // Takes ownership. 112 browser_process_->SetProfileManager(profile_manager_); // Takes ownership.
109 113
110 called_set_up_ = true; 114 called_set_up_ = true;
111 } 115 }
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