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

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

Issue 8463020: Make sure only the right processes can access the profile path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added user notification for network profiles. Created 8 years, 11 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 | « base/path_service.cc ('k') | chrome/app/generated_resources.grd » ('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/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/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 564
565 InitMacCrashReporter(command_line, process_type); 565 InitMacCrashReporter(command_line, process_type);
566 #endif 566 #endif
567 567
568 // Notice a user data directory override if any 568 // Notice a user data directory override if any
569 FilePath user_data_dir = 569 FilePath user_data_dir =
570 command_line.GetSwitchValuePath(switches::kUserDataDir); 570 command_line.GetSwitchValuePath(switches::kUserDataDir);
571 #if defined(OS_MACOSX) || defined(OS_WIN) 571 #if defined(OS_MACOSX) || defined(OS_WIN)
572 CheckUserDataDirPolicy(&user_data_dir); 572 CheckUserDataDirPolicy(&user_data_dir);
573 #endif 573 #endif
574 if (!user_data_dir.empty()) 574 if (!user_data_dir.empty()) {
575 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); 575 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir,
576 chrome::ProcessNeedsProfileDir(process_type)));
577 }
576 578
577 startup_timer_.reset(new base::StatsScope<base::StatsCounterTimer> 579 startup_timer_.reset(new base::StatsScope<base::StatsCounterTimer>
578 (content::Counters::chrome_main())); 580 (content::Counters::chrome_main()));
579 581
580 // Enable the heap profiler as early as possible! 582 // Enable the heap profiler as early as possible!
581 EnableHeapProfiler(command_line); 583 EnableHeapProfiler(command_line);
582 584
583 // Enable Message Loop related state asap. 585 // Enable Message Loop related state asap.
584 if (command_line.HasSwitch(switches::kMessageLoopHistogrammer)) 586 if (command_line.HasSwitch(switches::kMessageLoopHistogrammer))
585 MessageLoop::EnableHistogrammer(true); 587 MessageLoop::EnableHistogrammer(true);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 758
757 #if defined(USE_LINUX_BREAKPAD) 759 #if defined(USE_LINUX_BREAKPAD)
758 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets 760 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
759 // this up for the browser process in a different manner. 761 // this up for the browser process in a different manner.
760 InitCrashReporter(); 762 InitCrashReporter();
761 #endif 763 #endif
762 764
763 InitializeChromeContentClient(process_type); 765 InitializeChromeContentClient(process_type);
764 } 766 }
765 #endif // OS_MACOSX 767 #endif // OS_MACOSX
OLDNEW
« no previous file with comments | « base/path_service.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698