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

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

Issue 2118443002: Forward password-store switch to OSCrypt component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try this Created 4 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #endif 116 #endif
117 117
118 #if defined(OS_POSIX) && !defined(OS_MACOSX) 118 #if defined(OS_POSIX) && !defined(OS_MACOSX)
119 #include "components/crash/content/app/breakpad_linux.h" 119 #include "components/crash/content/app/breakpad_linux.h"
120 #endif 120 #endif
121 121
122 #if defined(OS_LINUX) 122 #if defined(OS_LINUX)
123 #include "base/environment.h" 123 #include "base/environment.h"
124 #endif 124 #endif
125 125
126 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
127 // Linux allows to chose between different password stores.
Lei Zhang 2016/07/06 18:57:28 nit: choose
cfroussios 2016/07/11 08:32:00 Done.
128 #include "components/os_crypt/os_crypt.h"
129 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
130
126 #if defined(OS_MACOSX) || defined(OS_WIN) 131 #if defined(OS_MACOSX) || defined(OS_WIN)
127 #include "chrome/browser/policy/policy_path_parser.h" 132 #include "chrome/browser/policy/policy_path_parser.h"
128 #endif 133 #endif
129 134
130 #if defined(OS_CHROMEOS) 135 #if defined(OS_CHROMEOS)
131 #include "components/metrics/leak_detector/leak_detector.h" 136 #include "components/metrics/leak_detector/leak_detector.h"
132 #endif 137 #endif
133 138
134 #if !defined(DISABLE_NACL) 139 #if !defined(DISABLE_NACL)
135 #include "components/nacl/common/nacl_switches.h" 140 #include "components/nacl/common/nacl_switches.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 645
641 #if defined (OS_CHROMEOS) 646 #if defined (OS_CHROMEOS)
642 // The TLS slot used by metrics::LeakDetector needs to be initialized early to 647 // The TLS slot used by metrics::LeakDetector needs to be initialized early to
643 // ensure that it gets assigned a low slow number. If it gets initialized too 648 // ensure that it gets assigned a low slow number. If it gets initialized too
644 // late, the glibc TLS system will require a malloc call in order to allocate 649 // late, the glibc TLS system will require a malloc call in order to allocate
645 // storage for a higher slot number. Normally that's not a problem, but in 650 // storage for a higher slot number. Normally that's not a problem, but in
646 // LeakDetector it will result in recursive alloc hook function calls. 651 // LeakDetector it will result in recursive alloc hook function calls.
647 metrics::LeakDetector::InitTLSSlot(); 652 metrics::LeakDetector::InitTLSSlot();
648 #endif 653 #endif
649 654
655 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
656 // Forward to os_crypt the flag to use a specific password store.
657 std::string password_store =
658 command_line.GetSwitchValueASCII(switches::kPasswordStore);
659 OSCrypt::SetStore(password_store);
660 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
661
650 return false; 662 return false;
651 } 663 }
652 664
653 #if defined(OS_MACOSX) 665 #if defined(OS_MACOSX)
654 void ChromeMainDelegate::InitMacCrashReporter( 666 void ChromeMainDelegate::InitMacCrashReporter(
655 const base::CommandLine& command_line, 667 const base::CommandLine& command_line,
656 const std::string& process_type) { 668 const std::string& process_type) {
657 // TODO(mark): Right now, InitializeCrashpad() needs to be called after 669 // TODO(mark): Right now, InitializeCrashpad() needs to be called after
658 // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, Crashpad 670 // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, Crashpad
659 // initialization could occur sooner, preferably even before the framework 671 // initialization could occur sooner, preferably even before the framework
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 case version_info::Channel::CANARY: 1050 case version_info::Channel::CANARY:
1039 return true; 1051 return true;
1040 case version_info::Channel::DEV: 1052 case version_info::Channel::DEV:
1041 case version_info::Channel::BETA: 1053 case version_info::Channel::BETA:
1042 case version_info::Channel::STABLE: 1054 case version_info::Channel::STABLE:
1043 default: 1055 default:
1044 // Don't enable instrumentation. 1056 // Don't enable instrumentation.
1045 return false; 1057 return false;
1046 } 1058 }
1047 } 1059 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698