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

Side by Side Diff: chrome/browser/web_resource/json_asynchronous_unpacker.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/browser/ui/webui/version_handler.cc ('k') | chrome/common/cancelable_task_tracker.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/web_resource/json_asynchronous_unpacker.h" 5 #include "chrome/browser/web_resource/json_asynchronous_unpacker.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/web_resource/web_resource_service.h" 8 #include "chrome/browser/web_resource/web_resource_service.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/chrome_utility_messages.h" 10 #include "chrome/common/chrome_utility_messages.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Release reference and set got_response_. 99 // Release reference and set got_response_.
100 void Cleanup() { 100 void Cleanup() {
101 DCHECK(!got_response_); 101 DCHECK(!got_response_);
102 got_response_ = true; 102 got_response_ = true;
103 Release(); 103 Release();
104 } 104 }
105 105
106 void StartProcessOnIOThread(BrowserThread::ID thread_id, 106 void StartProcessOnIOThread(BrowserThread::ID thread_id,
107 const std::string& json_data) { 107 const std::string& json_data) {
108 UtilityProcessHost* host = UtilityProcessHost::Create( 108 UtilityProcessHost* host = UtilityProcessHost::Create(
109 this, BrowserThread::GetMessageLoopProxyForThread(thread_id)); 109 this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get());
110 host->EnableZygote(); 110 host->EnableZygote();
111 // TODO(mrc): get proper file path when we start using web resources 111 // TODO(mrc): get proper file path when we start using web resources
112 // that need to be unpacked. 112 // that need to be unpacked.
113 host->Send(new ChromeUtilityMsg_UnpackWebResource(json_data)); 113 host->Send(new ChromeUtilityMsg_UnpackWebResource(json_data));
114 } 114 }
115 115
116 // True if we got a response from the utility process and have cleaned up 116 // True if we got a response from the utility process and have cleaned up
117 // already. 117 // already.
118 bool got_response_; 118 bool got_response_;
119 }; 119 };
120 120
121 JSONAsynchronousUnpacker* JSONAsynchronousUnpacker::Create( 121 JSONAsynchronousUnpacker* JSONAsynchronousUnpacker::Create(
122 JSONAsynchronousUnpackerDelegate* delegate) { 122 JSONAsynchronousUnpackerDelegate* delegate) {
123 return new JSONAsynchronousUnpackerImpl(delegate); 123 return new JSONAsynchronousUnpackerImpl(delegate);
124 } 124 }
125 125
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/version_handler.cc ('k') | chrome/common/cancelable_task_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698