diff options
author | pvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 23:40:30 +0000 |
---|---|---|
committer | pvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 23:40:30 +0000 |
commit | ca9b7dd291b73243b21c03c472544387f4886dae (patch) | |
tree | e5453c73e8c2d7d3c92aeffa5e42894e4e745e39 | |
parent | c0cfae67ccd13effa179eb2c6ec700f8a1b1d2e3 (diff) | |
download | chromium_src-ca9b7dd291b73243b21c03c472544387f4886dae.zip chromium_src-ca9b7dd291b73243b21c03c472544387f4886dae.tar.gz chromium_src-ca9b7dd291b73243b21c03c472544387f4886dae.tar.bz2 |
- USE_NSS instead of LINUX where applicable
- Rename nss_decryptor_linux to nss_decryptor_posix as it's more appropriate
Review URL: http://codereview.chromium.org/656012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39949 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/importer/nss_decryptor.cc | 8 | ||||
-rw-r--r-- | chrome/browser/importer/nss_decryptor.h | 6 | ||||
-rw-r--r-- | chrome/browser/importer/nss_decryptor_system_nss.cc (renamed from chrome/browser/importer/nss_decryptor_linux.cc) | 2 | ||||
-rw-r--r-- | chrome/browser/importer/nss_decryptor_system_nss.h (renamed from chrome/browser/importer/nss_decryptor_linux.h) | 6 | ||||
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.cc | 6 | ||||
-rw-r--r-- | chrome/browser/options_util.cc | 2 | ||||
-rwxr-xr-x | chrome/chrome_browser.gypi | 9 |
7 files changed, 22 insertions, 17 deletions
diff --git a/chrome/browser/importer/nss_decryptor.cc b/chrome/browser/importer/nss_decryptor.cc index c30aabd..b5893e1 100644 --- a/chrome/browser/importer/nss_decryptor.cc +++ b/chrome/browser/importer/nss_decryptor.cc @@ -8,10 +8,10 @@ #include "build/build_config.h" #include "chrome/common/sqlite_utils.h" -#if defined(OS_LINUX) +#if defined(USE_NSS) #include <pk11pub.h> #include <pk11sdr.h> -#endif // defined(OS_LINUX) +#endif // defined(USE_NSS) #include "base/base64.h" #include "base/utf_string_conversions.h" @@ -84,11 +84,11 @@ string16 NSSDecryptor::Decrypt(const std::string& crypt) const { SECItem reply; reply.data = NULL; reply.len = 0; -#if defined(OS_LINUX) +#if defined(USE_NSS) result = PK11SDR_DecryptWithSlot(slot, &request, &reply, NULL); #else result = PK11SDR_Decrypt(&request, &reply, NULL); -#endif // defined(OS_LINUX) +#endif // defined(USE_NSS) if (result == SECSuccess) plain.assign(reinterpret_cast<char*>(reply.data), reply.len); diff --git a/chrome/browser/importer/nss_decryptor.h b/chrome/browser/importer/nss_decryptor.h index d2ef391..c133665 100644 --- a/chrome/browser/importer/nss_decryptor.h +++ b/chrome/browser/importer/nss_decryptor.h @@ -7,12 +7,12 @@ #include "build/build_config.h" -#if defined(OS_LINUX) -#include "chrome/browser/importer/nss_decryptor_linux.h" -#elif defined(OS_MACOSX) +#if defined(OS_MACOSX) #include "chrome/browser/importer/nss_decryptor_mac.h" #elif defined(OS_WIN) #include "chrome/browser/importer/nss_decryptor_win.h" +#elif defined(USE_NSS) +#include "chrome/browser/importer/nss_decryptor_system_nss.h" #endif #endif // CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_H_ diff --git a/chrome/browser/importer/nss_decryptor_linux.cc b/chrome/browser/importer/nss_decryptor_system_nss.cc index 2fc083e..c15f8a6 100644 --- a/chrome/browser/importer/nss_decryptor_linux.cc +++ b/chrome/browser/importer/nss_decryptor_system_nss.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/importer/nss_decryptor_linux.h" +#include "chrome/browser/importer/nss_decryptor_system_nss.h" #include <pk11pub.h> #include <pk11sdr.h> diff --git a/chrome/browser/importer/nss_decryptor_linux.h b/chrome/browser/importer/nss_decryptor_system_nss.h index 918a063..7071428 100644 --- a/chrome/browser/importer/nss_decryptor_linux.h +++ b/chrome/browser/importer/nss_decryptor_system_nss.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_LINUX_H_ -#define CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_LINUX_H_ +#ifndef CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_SYSTEM_NSS_H_ +#define CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_SYSTEM_NSS_H_ #include <secmodt.h> #include <string> @@ -56,4 +56,4 @@ class NSSDecryptor { DISALLOW_COPY_AND_ASSIGN(NSSDecryptor); }; -#endif // CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_LINUX_H_ +#endif // CHROME_BROWSER_IMPORTER_NSS_DECRYPTOR_SYSTEM_NSS_H_ diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index 01181bc2..5550496 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -33,7 +33,7 @@ #include "net/url_request/url_request.h" #include "webkit/glue/webkit_glue.h" -#if defined(OS_LINUX) +#if defined(USE_NSS) #include "net/ocsp/nss_ocsp.h" #endif @@ -196,7 +196,7 @@ ChromeURLRequestContext* FactoryForOriginal::Create() { context->set_appcache_service( new ChromeAppCacheService(profile_dir_path_, context)); -#if defined(OS_LINUX) +#if defined(USE_NSS) // TODO(ukai): find a better way to set the URLRequestContext for OCSP. net::SetURLRequestContextForOCSP(context); #endif @@ -613,7 +613,7 @@ ChromeURLRequestContext::~ChromeURLRequestContext() { proxy_service_->SetProxyScriptFetcher(NULL); } -#if defined(OS_LINUX) +#if defined(USE_NSS) if (this == net::GetURLRequestContextForOCSP()) { // We are releasing the URLRequestContext used by OCSP handlers. net::SetURLRequestContextForOCSP(NULL); diff --git a/chrome/browser/options_util.cc b/chrome/browser/options_util.cc index 7b78051..d7e82ba 100644 --- a/chrome/browser/options_util.cc +++ b/chrome/browser/options_util.cc @@ -27,7 +27,7 @@ void OptionsUtil::ResetToDefaults(Profile* profile) { prefs::kCookieBehavior, prefs::kDefaultCharset, prefs::kDnsPrefetchingEnabled, -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) prefs::kCertRevocationCheckingEnabled, prefs::kSSL2Enabled, prefs::kSSL3Enabled, diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index d74a627..cf0779c 100755 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1297,10 +1297,10 @@ 'browser/importer/mork_reader.h', 'browser/importer/nss_decryptor.cc', 'browser/importer/nss_decryptor.h', - 'browser/importer/nss_decryptor_linux.cc', - 'browser/importer/nss_decryptor_linux.h', 'browser/importer/nss_decryptor_mac.h', 'browser/importer/nss_decryptor_mac.mm', + 'browser/importer/nss_decryptor_system_nss.cc', + 'browser/importer/nss_decryptor_system_nss.h', 'browser/importer/nss_decryptor_win.cc', 'browser/importer/nss_decryptor_win.h', 'browser/importer/safari_importer.h', @@ -2262,6 +2262,7 @@ ['OS=="freebsd" or OS=="openbsd"', { 'dependencies': [ '../build/linux/system.gyp:gtk', + '../build/linux/system.gyp:gtkprint', '../build/linux/system.gyp:nss', ], }], @@ -2271,6 +2272,8 @@ 'browser/bookmarks/bookmark_context_menu.cc', 'browser/bookmarks/bookmark_drop_info.cc', 'browser/dock_info.cc', + 'browser/importer/nss_decryptor_system_nss.cc', + 'browser/importer/nss_decryptor_system_nss.h', 'browser/jankometer.cc', 'browser/password_manager/password_store_gnome.h', 'browser/password_manager/password_store_gnome.cc', @@ -2436,6 +2439,8 @@ 'sources!': [ 'browser/browser_list_stub.cc', 'browser/history/history_publisher_none.cc', + 'browser/importer/nss_decryptor_system_nss.cc', + 'browser/importer/nss_decryptor_system_nss.h', 'browser/password_manager/password_store_gnome.h', 'browser/password_manager/password_store_gnome.cc', 'browser/password_manager/password_store_kwallet.h', |