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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 8342049: Added Protector, hooked up DSE verification with error bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved check to Protector, work with search engines via TemplateURLService Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "chrome/browser/password_manager/password_store_default.h" 55 #include "chrome/browser/password_manager/password_store_default.h"
56 #include "chrome/browser/plugin_prefs.h" 56 #include "chrome/browser/plugin_prefs.h"
57 #include "chrome/browser/policy/configuration_policy_pref_store.h" 57 #include "chrome/browser/policy/configuration_policy_pref_store.h"
58 #include "chrome/browser/prefs/browser_prefs.h" 58 #include "chrome/browser/prefs/browser_prefs.h"
59 #include "chrome/browser/prefs/pref_value_store.h" 59 #include "chrome/browser/prefs/pref_value_store.h"
60 #include "chrome/browser/prefs/scoped_user_pref_update.h" 60 #include "chrome/browser/prefs/scoped_user_pref_update.h"
61 #include "chrome/browser/prerender/prerender_manager_factory.h" 61 #include "chrome/browser/prerender/prerender_manager_factory.h"
62 #include "chrome/browser/profiles/profile_dependency_manager.h" 62 #include "chrome/browser/profiles/profile_dependency_manager.h"
63 #include "chrome/browser/profiles/profile_info_cache.h" 63 #include "chrome/browser/profiles/profile_info_cache.h"
64 #include "chrome/browser/profiles/profile_manager.h" 64 #include "chrome/browser/profiles/profile_manager.h"
65 #include "chrome/browser/protector/protector.h"
65 #include "chrome/browser/search_engines/template_url_fetcher.h" 66 #include "chrome/browser/search_engines/template_url_fetcher.h"
66 #include "chrome/browser/search_engines/template_url_service.h" 67 #include "chrome/browser/search_engines/template_url_service.h"
67 #include "chrome/browser/sessions/session_service_factory.h" 68 #include "chrome/browser/sessions/session_service_factory.h"
68 #include "chrome/browser/speech/chrome_speech_input_manager.h" 69 #include "chrome/browser/speech/chrome_speech_input_manager.h"
69 #include "chrome/browser/speech/chrome_speech_input_preferences.h" 70 #include "chrome/browser/speech/chrome_speech_input_preferences.h"
70 #include "chrome/browser/spellchecker/spellcheck_profile.h" 71 #include "chrome/browser/spellchecker/spellcheck_profile.h"
71 #include "chrome/browser/sync/profile_sync_factory_impl.h" 72 #include "chrome/browser/sync/profile_sync_factory_impl.h"
72 #include "chrome/browser/sync/profile_sync_service.h" 73 #include "chrome/browser/sync/profile_sync_service.h"
73 #include "chrome/browser/tabs/pinned_tab_service_factory.h" 74 #include "chrome/browser/tabs/pinned_tab_service_factory.h"
74 #include "chrome/browser/transport_security_persister.h" 75 #include "chrome/browser/transport_security_persister.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 host_zoom_map_(NULL), 275 host_zoom_map_(NULL),
275 history_service_created_(false), 276 history_service_created_(false),
276 favicon_service_created_(false), 277 favicon_service_created_(false),
277 created_web_data_service_(false), 278 created_web_data_service_(false),
278 created_password_store_(false), 279 created_password_store_(false),
279 start_time_(Time::Now()), 280 start_time_(Time::Now()),
280 #if defined(OS_WIN) 281 #if defined(OS_WIN)
281 checked_instant_promo_(false), 282 checked_instant_promo_(false),
282 #endif 283 #endif
283 delegate_(delegate), 284 delegate_(delegate),
284 predictor_(NULL) { 285 predictor_(NULL),
286 protector_(NULL) {
285 DCHECK(!path.empty()) << "Using an empty path will attempt to write " << 287 DCHECK(!path.empty()) << "Using an empty path will attempt to write " <<
286 "profile files to the root directory!"; 288 "profile files to the root directory!";
287 289
288 create_session_service_timer_.Start(FROM_HERE, 290 create_session_service_timer_.Start(FROM_HERE,
289 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, 291 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
290 &ProfileImpl::EnsureSessionServiceCreated); 292 &ProfileImpl::EnsureSessionServiceCreated);
291 293
292 // Determine if prefetch is enabled for this profile. 294 // Determine if prefetch is enabled for this profile.
293 // If not profile_manager is present, it means we are in a unittest. 295 // If not profile_manager is present, it means we are in a unittest.
294 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 296 const CommandLine* command_line = CommandLine::ForCurrentProcess();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 417
416 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path, 418 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path,
417 cache_max_size, media_cache_path, media_cache_max_size, 419 cache_max_size, media_cache_path, media_cache_max_size,
418 extensions_cookie_path, app_path, predictor_, 420 extensions_cookie_path, app_path, predictor_,
419 g_browser_process->local_state(), 421 g_browser_process->local_state(),
420 g_browser_process->io_thread()); 422 g_browser_process->io_thread());
421 423
422 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( 424 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
423 PluginPrefs::GetForProfile(this), &GetResourceContext()); 425 PluginPrefs::GetForProfile(this), &GetResourceContext());
424 426
427 // Protector depends on the other profile state parts like Prefs or
428 // TemplateURLService to be initialized.
429 protector_.reset(new protector::Protector(this));
430
425 // Creation has been finished. 431 // Creation has been finished.
426 if (delegate_) 432 if (delegate_)
427 delegate_->OnProfileCreated(this, true); 433 delegate_->OnProfileCreated(this, true);
428 434
429 content::NotificationService::current()->Notify( 435 content::NotificationService::current()->Notify(
430 chrome::NOTIFICATION_PROFILE_CREATED, 436 chrome::NOTIFICATION_PROFILE_CREATED,
431 content::Source<Profile>(this), 437 content::Source<Profile>(this),
432 content::NotificationService::NoDetails()); 438 content::NotificationService::NoDetails());
433 } 439 }
434 440
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 1683
1678 void ProfileImpl::ClearNetworkingHistorySince(base::Time time) { 1684 void ProfileImpl::ClearNetworkingHistorySince(base::Time time) {
1679 io_data_.ClearNetworkingHistorySince(time); 1685 io_data_.ClearNetworkingHistorySince(time);
1680 } 1686 }
1681 1687
1682 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { 1688 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() {
1683 if (!spellcheck_profile_.get()) 1689 if (!spellcheck_profile_.get())
1684 spellcheck_profile_.reset(new SpellCheckProfile()); 1690 spellcheck_profile_.reset(new SpellCheckProfile());
1685 return spellcheck_profile_.get(); 1691 return spellcheck_profile_.get();
1686 } 1692 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698