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

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

Issue 8427007: Thread::Stop() must be called before any subclass's destructor completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest version as trybot-ted Created 9 years, 1 month 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/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/command_line.h" 10 #include "base/command_line.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 protected: 56 protected:
57 virtual void CleanUp(); 57 virtual void CleanUp();
58 58
59 private: 59 private:
60 DISALLOW_COPY_AND_ASSIGN(ServiceIOThread); 60 DISALLOW_COPY_AND_ASSIGN(ServiceIOThread);
61 }; 61 };
62 62
63 ServiceIOThread::ServiceIOThread(const char* name) : base::Thread(name) {} 63 ServiceIOThread::ServiceIOThread(const char* name) : base::Thread(name) {}
64 ServiceIOThread::~ServiceIOThread() { 64 ServiceIOThread::~ServiceIOThread() {
65 // We cannot rely on our base class to stop the thread since we want our
66 // CleanUp function to run.
67 Stop(); 65 Stop();
68 } 66 }
69 67
70 void ServiceIOThread::CleanUp() { 68 void ServiceIOThread::CleanUp() {
71 content::URLFetcher::CancelAll(); 69 content::URLFetcher::CancelAll();
72 } 70 }
73 71
74 // Prepares the localized strings that are going to be displayed to 72 // Prepares the localized strings that are going to be displayed to
75 // the user if the service process dies. These strings are stored in the 73 // the user if the service process dies. These strings are stored in the
76 // environment block so they are accessible in the early stages of the 74 // environment block so they are accessible in the early stages of the
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } else { 360 } else {
363 Shutdown(); 361 Shutdown();
364 } 362 }
365 } 363 }
366 } 364 }
367 365
368 ServiceProcess::~ServiceProcess() { 366 ServiceProcess::~ServiceProcess() {
369 Teardown(); 367 Teardown();
370 g_service_process = NULL; 368 g_service_process = NULL;
371 } 369 }
OLDNEW
« no previous file with comments | « chrome/default_plugin/plugin_install_job_monitor.cc ('k') | chrome_frame/test/urlmon_moniker_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698