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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 98603012: Revert of Encrypt all stored cookies on selected operating systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/browser/safe_browsing/safe_browsing_service.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 19 matching lines...) Expand all
30 #include "chrome/browser/safe_browsing/protocol_manager.h" 30 #include "chrome/browser/safe_browsing/protocol_manager.h"
31 #include "chrome/browser/safe_browsing/safe_browsing_database.h" 31 #include "chrome/browser/safe_browsing/safe_browsing_database.h"
32 #include "chrome/browser/safe_browsing/ui_manager.h" 32 #include "chrome/browser/safe_browsing/ui_manager.h"
33 #include "chrome/common/chrome_constants.h" 33 #include "chrome/common/chrome_constants.h"
34 #include "chrome/common/chrome_paths.h" 34 #include "chrome/common/chrome_paths.h"
35 #include "chrome/common/chrome_switches.h" 35 #include "chrome/common/chrome_switches.h"
36 #include "chrome/common/pref_names.h" 36 #include "chrome/common/pref_names.h"
37 #include "chrome/common/url_constants.h" 37 #include "chrome/common/url_constants.h"
38 #include "components/startup_metric_utils/startup_metric_utils.h" 38 #include "components/startup_metric_utils/startup_metric_utils.h"
39 #include "content/public/browser/browser_thread.h" 39 #include "content/public/browser/browser_thread.h"
40 #include "content/public/browser/cookie_crypto_delegate.h"
41 #include "content/public/browser/cookie_store_factory.h" 40 #include "content/public/browser/cookie_store_factory.h"
42 #include "content/public/browser/notification_service.h" 41 #include "content/public/browser/notification_service.h"
43 #include "net/cookies/cookie_monster.h" 42 #include "net/cookies/cookie_monster.h"
44 #include "net/url_request/url_request_context.h" 43 #include "net/url_request/url_request_context.h"
45 #include "net/url_request/url_request_context_getter.h" 44 #include "net/url_request/url_request_context_getter.h"
46 45
47 #if defined(OS_WIN) 46 #if defined(OS_WIN)
48 #include "chrome/installer/util/browser_distribution.h" 47 #include "chrome/installer/util/browser_distribution.h"
49 #endif 48 #endif
50 49
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 void SafeBrowsingService::InitURLRequestContextOnIOThread( 302 void SafeBrowsingService::InitURLRequestContextOnIOThread(
304 net::URLRequestContextGetter* system_url_request_context_getter) { 303 net::URLRequestContextGetter* system_url_request_context_getter) {
305 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 304 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
306 DCHECK(!url_request_context_.get()); 305 DCHECK(!url_request_context_.get());
307 306
308 scoped_refptr<net::CookieStore> cookie_store( 307 scoped_refptr<net::CookieStore> cookie_store(
309 content::CreatePersistentCookieStore( 308 content::CreatePersistentCookieStore(
310 CookieFilePath(), 309 CookieFilePath(),
311 false, 310 false,
312 NULL, 311 NULL,
313 NULL, 312 NULL));
314 scoped_ptr<content::CookieCryptoDelegate>()));
315 313
316 url_request_context_.reset(new net::URLRequestContext); 314 url_request_context_.reset(new net::URLRequestContext);
317 // |system_url_request_context_getter| may be NULL during tests. 315 // |system_url_request_context_getter| may be NULL during tests.
318 if (system_url_request_context_getter) { 316 if (system_url_request_context_getter) {
319 url_request_context_->CopyFrom( 317 url_request_context_->CopyFrom(
320 system_url_request_context_getter->GetURLRequestContext()); 318 system_url_request_context_getter->GetURLRequestContext());
321 } 319 }
322 url_request_context_->set_cookie_store(cookie_store.get()); 320 url_request_context_->set_cookie_store(cookie_store.get());
323 } 321 }
324 322
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 #if defined(FULL_SAFE_BROWSING) 484 #if defined(FULL_SAFE_BROWSING)
487 if (csd_service_.get()) 485 if (csd_service_.get())
488 csd_service_->SetEnabledAndRefreshState(enable); 486 csd_service_->SetEnabledAndRefreshState(enable);
489 if (download_service_.get()) { 487 if (download_service_.get()) {
490 download_service_->SetEnabled( 488 download_service_->SetEnabled(
491 enable && !CommandLine::ForCurrentProcess()->HasSwitch( 489 enable && !CommandLine::ForCurrentProcess()->HasSwitch(
492 switches::kDisableImprovedDownloadProtection)); 490 switches::kDisableImprovedDownloadProtection));
493 } 491 }
494 #endif 492 #endif
495 } 493 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | content/browser/net/sqlite_persistent_cookie_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698