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

Side by Side Diff: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc

Issue 10383207: Fix new -Wnull-conversion violations detected by a newer clang. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
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/extensions/api/offscreen_tabs/offscreen_tabs_api.h" 5 #include "chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 result_.reset(offscreen_tab->CreateValue()); 537 result_.reset(offscreen_tab->CreateValue());
538 return true; 538 return true;
539 } 539 }
540 540
541 GetAllOffscreenTabFunction::GetAllOffscreenTabFunction() {} 541 GetAllOffscreenTabFunction::GetAllOffscreenTabFunction() {}
542 GetAllOffscreenTabFunction::~GetAllOffscreenTabFunction() {} 542 GetAllOffscreenTabFunction::~GetAllOffscreenTabFunction() {}
543 543
544 bool GetAllOffscreenTabFunction::RunImpl() { 544 bool GetAllOffscreenTabFunction::RunImpl() {
545 WebContents* web_contents = GetCurrentWebContents(this, &error_); 545 WebContents* web_contents = GetCurrentWebContents(this, &error_);
546 if (!web_contents) 546 if (!web_contents)
547 return NULL; 547 return false;
548 548
549 ParentTab* parent_tab = GetMap()->GetParentTab(web_contents, extension_id()); 549 ParentTab* parent_tab = GetMap()->GetParentTab(web_contents, extension_id());
550 ListValue* tab_list = new ListValue(); 550 ListValue* tab_list = new ListValue();
551 if (parent_tab) { 551 if (parent_tab) {
552 for (OffscreenTabs::const_iterator i = parent_tab->offscreen_tabs().begin(); 552 for (OffscreenTabs::const_iterator i = parent_tab->offscreen_tabs().begin();
553 i != parent_tab->offscreen_tabs().end(); ++i) 553 i != parent_tab->offscreen_tabs().end(); ++i)
554 tab_list->Append((*i)->CreateValue()); 554 tab_list->Append((*i)->CreateValue());
555 } 555 }
556 556
557 result_.reset(tab_list); 557 result_.reset(tab_list);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 // async case (when a "javascript": URL is sent to a tab). 831 // async case (when a "javascript": URL is sent to a tab).
832 if (!is_async) 832 if (!is_async)
833 SendResponse(true); 833 SendResponse(true);
834 834
835 return true; 835 return true;
836 } 836 }
837 837
838 void UpdateOffscreenTabFunction::PopulateResult() { 838 void UpdateOffscreenTabFunction::PopulateResult() {
839 // There's no result associated with this callback. 839 // There's no result associated with this callback.
840 } 840 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | chrome/browser/extensions/test_extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698