OLD | NEW |
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 | 420 |
421 // Make sure we initialize the ProfileIOData after everything else has been | 421 // Make sure we initialize the ProfileIOData after everything else has been |
422 // initialized that we might be reading from the IO thread. | 422 // initialized that we might be reading from the IO thread. |
423 io_data_.Init(cookie_path, cache_path, cache_max_size, | 423 io_data_.Init(cookie_path, cache_path, cache_max_size, |
424 media_cache_path, media_cache_max_size, extensions_cookie_path, | 424 media_cache_path, media_cache_max_size, extensions_cookie_path, |
425 app_path); | 425 app_path); |
426 | 426 |
427 // Creation has been finished. | 427 // Creation has been finished. |
428 if (delegate_) | 428 if (delegate_) |
429 delegate_->OnProfileCreated(this, true); | 429 delegate_->OnProfileCreated(this, true); |
| 430 |
| 431 NotificationService::current()->Notify( |
| 432 chrome::NOTIFICATION_PROFILE_CREATED, |
| 433 Source<Profile>(this), |
| 434 NotificationService::NoDetails()); |
430 } | 435 } |
431 | 436 |
432 void ProfileImpl::InitExtensions(bool extensions_enabled) { | 437 void ProfileImpl::InitExtensions(bool extensions_enabled) { |
433 if (user_script_master_ || extension_service_.get()) | 438 if (user_script_master_ || extension_service_.get()) |
434 return; // Already initialized. | 439 return; // Already initialized. |
435 | 440 |
436 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 441 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
437 if (command_line->HasSwitch( | 442 if (command_line->HasSwitch( |
438 switches::kEnableExtensionTimelineApi)) { | 443 switches::kEnableExtensionTimelineApi)) { |
439 extension_devtools_manager_ = new ExtensionDevToolsManager(this); | 444 extension_devtools_manager_ = new ExtensionDevToolsManager(this); |
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1657 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
1653 return NULL; | 1658 return NULL; |
1654 if (!prerender_manager_.get()) { | 1659 if (!prerender_manager_.get()) { |
1655 CHECK(g_browser_process->prerender_tracker()); | 1660 CHECK(g_browser_process->prerender_tracker()); |
1656 prerender_manager_.reset( | 1661 prerender_manager_.reset( |
1657 new prerender::PrerenderManager( | 1662 new prerender::PrerenderManager( |
1658 this, g_browser_process->prerender_tracker())); | 1663 this, g_browser_process->prerender_tracker())); |
1659 } | 1664 } |
1660 return prerender_manager_.get(); | 1665 return prerender_manager_.get(); |
1661 } | 1666 } |
OLD | NEW |