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

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

Issue 1878943002: Revert of Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 21 matching lines...) Expand all
32 #include "chrome/grit/chromium_strings.h" 32 #include "chrome/grit/chromium_strings.h"
33 #include "chrome/grit/generated_resources.h" 33 #include "chrome/grit/generated_resources.h"
34 #include "chrome/service/cloud_print/cloud_print_message_handler.h" 34 #include "chrome/service/cloud_print/cloud_print_message_handler.h"
35 #include "chrome/service/cloud_print/cloud_print_proxy.h" 35 #include "chrome/service/cloud_print/cloud_print_proxy.h"
36 #include "chrome/service/net/service_url_request_context_getter.h" 36 #include "chrome/service/net/service_url_request_context_getter.h"
37 #include "chrome/service/service_process_prefs.h" 37 #include "chrome/service/service_process_prefs.h"
38 #include "components/prefs/json_pref_store.h" 38 #include "components/prefs/json_pref_store.h"
39 #include "net/base/network_change_notifier.h" 39 #include "net/base/network_change_notifier.h"
40 #include "net/url_request/url_fetcher.h" 40 #include "net/url_request/url_fetcher.h"
41 #include "ui/base/l10n/l10n_util.h" 41 #include "ui/base/l10n/l10n_util.h"
42 #include "ui/base/material_design/material_design_controller.h"
43 #include "ui/base/resource/resource_bundle.h" 42 #include "ui/base/resource/resource_bundle.h"
44 #include "ui/base/ui_base_switches.h" 43 #include "ui/base/ui_base_switches.h"
45 44
46 #if defined(USE_GLIB) 45 #if defined(USE_GLIB)
47 #include <glib-object.h> 46 #include <glib-object.h>
48 #endif 47 #endif
49 48
50 ServiceProcess* g_service_process = NULL; 49 ServiceProcess* g_service_process = NULL;
51 50
52 namespace { 51 namespace {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 service_prefs_->WritePrefs(); 173 service_prefs_->WritePrefs();
175 } else { 174 } else {
176 // If no command-line value was specified, read the last used locale from 175 // If no command-line value was specified, read the last used locale from
177 // the prefs. 176 // the prefs.
178 locale = 177 locale =
179 service_prefs_->GetString(prefs::kApplicationLocale, std::string()); 178 service_prefs_->GetString(prefs::kApplicationLocale, std::string());
180 // If no locale was specified anywhere, use the default one. 179 // If no locale was specified anywhere, use the default one.
181 if (locale.empty()) 180 if (locale.empty())
182 locale = kDefaultServiceProcessLocale; 181 locale = kDefaultServiceProcessLocale;
183 } 182 }
184 ui::MaterialDesignController::Initialize();
185 ui::ResourceBundle::InitSharedInstanceWithLocale( 183 ui::ResourceBundle::InitSharedInstanceWithLocale(
186 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); 184 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
187 185
188 PrepareRestartOnCrashEnviroment(command_line); 186 PrepareRestartOnCrashEnviroment(command_line);
189 187
190 // Enable Cloud Print if needed. First check the command-line. 188 // Enable Cloud Print if needed. First check the command-line.
191 // Then check if the cloud print proxy was previously enabled. 189 // Then check if the cloud print proxy was previously enabled.
192 if (command_line.HasSwitch(switches::kEnableCloudPrintProxy) || 190 if (command_line.HasSwitch(switches::kEnableCloudPrintProxy) ||
193 service_prefs_->GetBoolean(prefs::kCloudPrintProxyEnabled, false)) { 191 service_prefs_->GetBoolean(prefs::kCloudPrintProxyEnabled, false)) {
194 GetCloudPrintProxy()->EnableForUser(); 192 GetCloudPrintProxy()->EnableForUser();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } else { 363 } else {
366 Shutdown(); 364 Shutdown();
367 } 365 }
368 } 366 }
369 } 367 }
370 368
371 ServiceProcess::~ServiceProcess() { 369 ServiceProcess::~ServiceProcess() {
372 Teardown(); 370 Teardown();
373 g_service_process = NULL; 371 g_service_process = NULL;
374 } 372 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc ('k') | content/public/test/browser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698