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

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 258743005: Enable Enterprise enrollment on desktop builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added arg to PathService::OverrideAndCreateIfNeeded, added test for FakeCryptohomeClient::InstallAt… Created 6 years, 7 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
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/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/cpu.h" 8 #include "base/cpu.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string); 343 user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string);
344 } 344 }
345 } 345 }
346 #endif 346 #endif
347 #if defined(OS_MACOSX) || defined(OS_WIN) 347 #if defined(OS_MACOSX) || defined(OS_WIN)
348 policy::path_parser::CheckUserDataDirPolicy(&user_data_dir); 348 policy::path_parser::CheckUserDataDirPolicy(&user_data_dir);
349 #endif 349 #endif
350 350
351 const bool specified_directory_was_invalid = !user_data_dir.empty() && 351 const bool specified_directory_was_invalid = !user_data_dir.empty() &&
352 !PathService::OverrideAndCreateIfNeeded(chrome::DIR_USER_DATA, 352 !PathService::OverrideAndCreateIfNeeded(chrome::DIR_USER_DATA,
353 user_data_dir, true); 353 user_data_dir, false, true);
354 // Save inaccessible or invalid paths so the user may be prompted later. 354 // Save inaccessible or invalid paths so the user may be prompted later.
355 if (specified_directory_was_invalid) 355 if (specified_directory_was_invalid)
356 chrome::SetInvalidSpecifiedUserDataDir(user_data_dir); 356 chrome::SetInvalidSpecifiedUserDataDir(user_data_dir);
357 357
358 // Warn and fail early if the process fails to get a user data directory. 358 // Warn and fail early if the process fails to get a user data directory.
359 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { 359 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
360 // If an invalid command-line or policy override was specified, the user 360 // If an invalid command-line or policy override was specified, the user
361 // will be given an error with that value. Otherwise, use the directory 361 // will be given an error with that value. Otherwise, use the directory
362 // returned by PathService (or the fallback default directory) in the error. 362 // returned by PathService (or the fallback default directory) in the error.
363 if (!specified_directory_was_invalid) { 363 if (!specified_directory_was_invalid) {
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 } 910 }
911 911
912 content::ContentUtilityClient* 912 content::ContentUtilityClient*
913 ChromeMainDelegate::CreateContentUtilityClient() { 913 ChromeMainDelegate::CreateContentUtilityClient() {
914 #if defined(CHROME_MULTIPLE_DLL_BROWSER) 914 #if defined(CHROME_MULTIPLE_DLL_BROWSER)
915 return NULL; 915 return NULL;
916 #else 916 #else
917 return g_chrome_content_utility_client.Pointer(); 917 return g_chrome_content_utility_client.Pointer();
918 #endif 918 #endif
919 } 919 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698