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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/automation/proxy_launcher.cc ('k') | chrome/test/base/ui_test_utils.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 "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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // Normally this would happen during browser startup, but for tests 284 // Normally this would happen during browser startup, but for tests
285 // we need to trigger creation of Profile-related services. 285 // we need to trigger creation of Profile-related services.
286 ChromeBrowserMainExtraPartsProfiles:: 286 ChromeBrowserMainExtraPartsProfiles::
287 EnsureBrowserContextKeyedServiceFactoriesBuilt(); 287 EnsureBrowserContextKeyedServiceFactoriesBuilt();
288 288
289 if (prefs_.get()) 289 if (prefs_.get())
290 user_prefs::UserPrefs::Set(this, prefs_.get()); 290 user_prefs::UserPrefs::Set(this, prefs_.get());
291 else 291 else
292 CreateTestingPrefService(); 292 CreateTestingPrefService();
293 293
294 if (!file_util::PathExists(profile_path_)) 294 if (!base::PathExists(profile_path_))
295 file_util::CreateDirectory(profile_path_); 295 file_util::CreateDirectory(profile_path_);
296 296
297 // TODO(joaodasilva): remove this once this PKS isn't created in ProfileImpl 297 // TODO(joaodasilva): remove this once this PKS isn't created in ProfileImpl
298 // anymore, after converting the PrefService to a PKS. Until then it must 298 // anymore, after converting the PrefService to a PKS. Until then it must
299 // be associated with a TestingProfile too. 299 // be associated with a TestingProfile too.
300 CreateProfilePolicyConnector(); 300 CreateProfilePolicyConnector();
301 301
302 extensions::ExtensionSystemFactory::GetInstance()->SetTestingFactory( 302 extensions::ExtensionSystemFactory::GetInstance()->SetTestingFactory(
303 this, extensions::TestExtensionSystem::Build); 303 this, extensions::TestExtensionSystem::Build);
304 304
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 797
798 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { 798 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() {
799 DCHECK(!build_called_); 799 DCHECK(!build_called_);
800 build_called_ = true; 800 build_called_ = true;
801 return scoped_ptr<TestingProfile>(new TestingProfile( 801 return scoped_ptr<TestingProfile>(new TestingProfile(
802 path_, 802 path_,
803 delegate_, 803 delegate_,
804 extension_policy_, 804 extension_policy_,
805 pref_service_.Pass())); 805 pref_service_.Pass()));
806 } 806 }
OLDNEW
« no previous file with comments | « chrome/test/automation/proxy_launcher.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698