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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 6901031: Profile shouldn't own Session/TabRestore services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again and hope upload works this time Created 9 years, 8 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "chrome/browser/notifications/balloon_collection.h" 55 #include "chrome/browser/notifications/balloon_collection.h"
56 #include "chrome/browser/notifications/notification.h" 56 #include "chrome/browser/notifications/notification.h"
57 #include "chrome/browser/notifications/notification_ui_manager.h" 57 #include "chrome/browser/notifications/notification_ui_manager.h"
58 #include "chrome/browser/password_manager/password_store.h" 58 #include "chrome/browser/password_manager/password_store.h"
59 #include "chrome/browser/platform_util.h" 59 #include "chrome/browser/platform_util.h"
60 #include "chrome/browser/prefs/pref_service.h" 60 #include "chrome/browser/prefs/pref_service.h"
61 #include "chrome/browser/profiles/profile.h" 61 #include "chrome/browser/profiles/profile.h"
62 #include "chrome/browser/profiles/profile_manager.h" 62 #include "chrome/browser/profiles/profile_manager.h"
63 #include "chrome/browser/search_engines/template_url.h" 63 #include "chrome/browser/search_engines/template_url.h"
64 #include "chrome/browser/search_engines/template_url_model.h" 64 #include "chrome/browser/search_engines/template_url_model.h"
65 #include "chrome/browser/sessions/session_service_factory.h"
65 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" 66 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
66 #include "chrome/browser/tab_contents/link_infobar_delegate.h" 67 #include "chrome/browser/tab_contents/link_infobar_delegate.h"
67 #include "chrome/browser/themes/theme_service.h" 68 #include "chrome/browser/themes/theme_service.h"
68 #include "chrome/browser/themes/theme_service_factory.h" 69 #include "chrome/browser/themes/theme_service_factory.h"
69 #include "chrome/browser/translate/translate_infobar_delegate.h" 70 #include "chrome/browser/translate/translate_infobar_delegate.h"
70 #include "chrome/browser/translate/translate_tab_helper.h" 71 #include "chrome/browser/translate/translate_tab_helper.h"
71 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" 72 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
72 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" 73 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
73 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" 74 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
74 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 75 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
(...skipping 5494 matching lines...) Expand 10 before | Expand all | Expand 10 after
5569 5570
5570 if (browser->command_updater()->IsCommandEnabled(IDC_ENCODING_MENU)) 5571 if (browser->command_updater()->IsCommandEnabled(IDC_ENCODING_MENU))
5571 *current_encoding = nav->tab_contents()->encoding(); 5572 *current_encoding = nav->tab_contents()->encoding();
5572 } 5573 }
5573 } 5574 }
5574 5575
5575 void TestingAutomationProvider::ShutdownSessionService(int handle, 5576 void TestingAutomationProvider::ShutdownSessionService(int handle,
5576 bool* result) { 5577 bool* result) {
5577 if (browser_tracker_->ContainsHandle(handle)) { 5578 if (browser_tracker_->ContainsHandle(handle)) {
5578 Browser* browser = browser_tracker_->GetResource(handle); 5579 Browser* browser = browser_tracker_->GetResource(handle);
5579 browser->profile()->ShutdownSessionService(); 5580 SessionServiceFactory::ShutdownForProfile(browser->profile());
5580 *result = true; 5581 *result = true;
5581 } else { 5582 } else {
5582 *result = false; 5583 *result = false;
5583 } 5584 }
5584 } 5585 }
5585 5586
5586 void TestingAutomationProvider::SetContentSetting( 5587 void TestingAutomationProvider::SetContentSetting(
5587 int handle, 5588 int handle,
5588 const std::string& host, 5589 const std::string& host,
5589 ContentSettingsType content_type, 5590 ContentSettingsType content_type,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
5663 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 5664 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
5664 5665
5665 Send(reply_message_); 5666 Send(reply_message_);
5666 redirect_query_ = 0; 5667 redirect_query_ = 0;
5667 reply_message_ = NULL; 5668 reply_message_ = NULL;
5668 } 5669 }
5669 5670
5670 void TestingAutomationProvider::OnRemoveProvider() { 5671 void TestingAutomationProvider::OnRemoveProvider() {
5671 AutomationProviderList::GetInstance()->RemoveProvider(this); 5672 AutomationProviderList::GetInstance()->RemoveProvider(this);
5672 } 5673 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698