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

Side by Side Diff: chrome/service/service_process.cc

Issue 14863003: Allow cloud print connector to use test gaia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « chrome/service/cloud_print/cloud_print_auth.cc ('k') | cloud_print/DEPS » ('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/service/service_process.h" 5 #include "chrome/service/service_process.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 base::FilePath user_data_dir; 160 base::FilePath user_data_dir;
161 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 161 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
162 base::FilePath pref_path = 162 base::FilePath pref_path =
163 user_data_dir.Append(chrome::kServiceStateFileName); 163 user_data_dir.Append(chrome::kServiceStateFileName);
164 service_prefs_.reset( 164 service_prefs_.reset(
165 new ServiceProcessPrefs( 165 new ServiceProcessPrefs(
166 pref_path, 166 pref_path,
167 JsonPrefStore::GetTaskRunnerForFile(pref_path, blocking_pool_))); 167 JsonPrefStore::GetTaskRunnerForFile(pref_path, blocking_pool_)));
168 service_prefs_->ReadPrefs(); 168 service_prefs_->ReadPrefs();
169 169
170 // This switch it required to run connector with test gaia.
171 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests))
172 net::URLFetcher::SetIgnoreCertificateRequests(true);
173
170 // Check if a locale override has been specified on the command-line. 174 // Check if a locale override has been specified on the command-line.
171 std::string locale = command_line.GetSwitchValueASCII(switches::kLang); 175 std::string locale = command_line.GetSwitchValueASCII(switches::kLang);
172 if (!locale.empty()) { 176 if (!locale.empty()) {
173 service_prefs_->SetString(prefs::kApplicationLocale, locale); 177 service_prefs_->SetString(prefs::kApplicationLocale, locale);
174 service_prefs_->WritePrefs(); 178 service_prefs_->WritePrefs();
175 } else { 179 } else {
176 // If no command-line value was specified, read the last used locale from 180 // If no command-line value was specified, read the last used locale from
177 // the prefs. 181 // the prefs.
178 locale = 182 locale =
179 service_prefs_->GetString(prefs::kApplicationLocale, std::string()); 183 service_prefs_->GetString(prefs::kApplicationLocale, std::string());
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 if (enabled_services_ && !ipc_server_->is_client_connected()) { 371 if (enabled_services_ && !ipc_server_->is_client_connected()) {
368 GetCloudPrintProxy()->CheckCloudPrintProxyPolicy(); 372 GetCloudPrintProxy()->CheckCloudPrintProxyPolicy();
369 } 373 }
370 ScheduleCloudPrintPolicyCheck(); 374 ScheduleCloudPrintPolicyCheck();
371 } 375 }
372 376
373 ServiceProcess::~ServiceProcess() { 377 ServiceProcess::~ServiceProcess() {
374 Teardown(); 378 Teardown();
375 g_service_process = NULL; 379 g_service_process = NULL;
376 } 380 }
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_auth.cc ('k') | cloud_print/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698