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

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

Issue 13671005: Re-apply 192420: Move login switches to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 #include "content/public/browser/web_contents.h" 71 #include "content/public/browser/web_contents.h"
72 #include "content/public/browser/web_contents_view.h" 72 #include "content/public/browser/web_contents_view.h"
73 #include "net/proxy/proxy_config_service_fixed.h" 73 #include "net/proxy/proxy_config_service_fixed.h"
74 #include "net/proxy/proxy_service.h" 74 #include "net/proxy/proxy_service.h"
75 #include "net/url_request/url_request_context.h" 75 #include "net/url_request/url_request_context.h"
76 #include "net/url_request/url_request_context_getter.h" 76 #include "net/url_request/url_request_context_getter.h"
77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
78 78
79 #if defined(OS_CHROMEOS) 79 #if defined(OS_CHROMEOS)
80 #include "chrome/browser/chromeos/login/user_manager.h" 80 #include "chrome/browser/chromeos/login/user_manager.h"
81 #include "chromeos/chromeos_switches.h"
81 #endif // defined(OS_CHROMEOS) 82 #endif // defined(OS_CHROMEOS)
82 83
83 using WebKit::WebFindOptions; 84 using WebKit::WebFindOptions;
84 using base::Time; 85 using base::Time;
85 using content::BrowserThread; 86 using content::BrowserThread;
86 using content::DownloadItem; 87 using content::DownloadItem;
87 using content::NavigationController; 88 using content::NavigationController;
88 using content::RenderViewHost; 89 using content::RenderViewHost;
89 using content::TraceController; 90 using content::TraceController;
90 using content::WebContents; 91 using content::WebContents;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 effective_channel_id, 210 effective_channel_id,
210 GetChannelMode(use_named_interface), 211 GetChannelMode(use_named_interface),
211 this, 212 this,
212 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); 213 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
213 channel_->AddFilter(automation_resource_message_filter_); 214 channel_->AddFilter(automation_resource_message_filter_);
214 215
215 #if defined(OS_CHROMEOS) 216 #if defined(OS_CHROMEOS)
216 if (use_initial_load_observers_) { 217 if (use_initial_load_observers_) {
217 // Wait for webui login to be ready. 218 // Wait for webui login to be ready.
218 // Observer will delete itself. 219 // Observer will delete itself.
219 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager) && 220 if (CommandLine::ForCurrentProcess()->HasSwitch(
221 chromeos::switches::kLoginManager) &&
220 !chromeos::UserManager::Get()->IsUserLoggedIn()) { 222 !chromeos::UserManager::Get()->IsUserLoggedIn()) {
221 login_webui_ready_ = false; 223 login_webui_ready_ = false;
222 new OOBEWebuiReadyObserver(this); 224 new OOBEWebuiReadyObserver(this);
223 } 225 }
224 226
225 // Wait for the network manager to initialize. 227 // Wait for the network manager to initialize.
226 // The observer will delete itself when done. 228 // The observer will delete itself when done.
227 network_library_initialized_ = false; 229 network_library_initialized_ = false;
228 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this); 230 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this);
229 if (!observer->Init()) 231 if (!observer->Init())
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 825
824 return NULL; 826 return NULL;
825 } 827 }
826 828
827 void AutomationProvider::SaveAsAsync(int tab_handle) { 829 void AutomationProvider::SaveAsAsync(int tab_handle) {
828 NavigationController* tab = NULL; 830 NavigationController* tab = NULL;
829 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 831 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
830 if (web_contents) 832 if (web_contents)
831 web_contents->OnSavePage(); 833 web_contents->OnSavePage();
832 } 834 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698