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

Side by Side Diff: chrome/browser/pepper_flash_settings_manager.cc

Issue 307653003: Introduce IPC::Channel::Create*() to ensure it being heap-allocated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows build, landing again. Created 6 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 | « no previous file | chrome/utility/importer/firefox_importer_unittest_utils_mac.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/pepper_flash_settings_manager.h" 5 #include "chrome/browser/pepper_flash_settings_manager.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 DCHECK(state_ == STATE_UNINITIALIZED); 347 DCHECK(state_ == STATE_UNINITIALIZED);
348 DCHECK(!channel_.get()); 348 DCHECK(!channel_.get());
349 349
350 if (!success) { 350 if (!success) {
351 DLOG(ERROR) << "Couldn't open plugin channel"; 351 DLOG(ERROR) << "Couldn't open plugin channel";
352 NotifyErrorFromIOThread(); 352 NotifyErrorFromIOThread();
353 return; 353 return;
354 } 354 }
355 355
356 channel_.reset(new IPC::Channel(handle, IPC::Channel::MODE_CLIENT, this)); 356 channel_ = IPC::Channel::CreateClient(handle, this);
357 if (!channel_->Connect()) { 357 if (!channel_->Connect()) {
358 DLOG(ERROR) << "Couldn't connect to plugin"; 358 DLOG(ERROR) << "Couldn't connect to plugin";
359 NotifyErrorFromIOThread(); 359 NotifyErrorFromIOThread();
360 return; 360 return;
361 } 361 }
362 362
363 state_ = STATE_INITIALIZED; 363 state_ = STATE_INITIALIZED;
364 364
365 std::vector<PendingRequest> temp_pending_requests; 365 std::vector<PendingRequest> temp_pending_requests;
366 temp_pending_requests.swap(pending_requests_); 366 temp_pending_requests.swap(pending_requests_);
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 } 1062 }
1063 1063
1064 void PepperFlashSettingsManager::OnError(Core* core) { 1064 void PepperFlashSettingsManager::OnError(Core* core) {
1065 DCHECK(core); 1065 DCHECK(core);
1066 if (core != core_.get()) 1066 if (core != core_.get())
1067 return; 1067 return;
1068 1068
1069 core_->Detach(); 1069 core_->Detach();
1070 core_ = NULL; 1070 core_ = NULL;
1071 } 1071 }
OLDNEW
« no previous file with comments | « no previous file | chrome/utility/importer/firefox_importer_unittest_utils_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698