OLD | NEW |
1 // Copyright (c) 2012 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/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" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
(...skipping 26 matching lines...) Expand all Loading... |
38 #include "ui/gfx/gtk_util.h" | 38 #include "ui/gfx/gtk_util.h" |
39 #include <gtk/gtk.h> | 39 #include <gtk/gtk.h> |
40 #endif | 40 #endif |
41 | 41 |
42 ServiceProcess* g_service_process = NULL; | 42 ServiceProcess* g_service_process = NULL; |
43 | 43 |
44 namespace { | 44 namespace { |
45 | 45 |
46 // Delay in millseconds after the last service is disabled before we attempt | 46 // Delay in millseconds after the last service is disabled before we attempt |
47 // a shutdown. | 47 // a shutdown. |
48 const base::TimeDelta kShutdownDelay = base::TimeDelta::FromMinutes(1); | 48 const int64 kShutdownDelay = 60000; |
49 | 49 |
50 const char kDefaultServiceProcessLocale[] = "en-US"; | 50 const char kDefaultServiceProcessLocale[] = "en-US"; |
51 | 51 |
52 class ServiceIOThread : public base::Thread { | 52 class ServiceIOThread : public base::Thread { |
53 public: | 53 public: |
54 explicit ServiceIOThread(const char* name); | 54 explicit ServiceIOThread(const char* name); |
55 virtual ~ServiceIOThread(); | 55 virtual ~ServiceIOThread(); |
56 | 56 |
57 protected: | 57 protected: |
58 virtual void CleanUp(); | 58 virtual void CleanUp(); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } else { | 362 } else { |
363 Shutdown(); | 363 Shutdown(); |
364 } | 364 } |
365 } | 365 } |
366 } | 366 } |
367 | 367 |
368 ServiceProcess::~ServiceProcess() { | 368 ServiceProcess::~ServiceProcess() { |
369 Teardown(); | 369 Teardown(); |
370 g_service_process = NULL; | 370 g_service_process = NULL; |
371 } | 371 } |
OLD | NEW |