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

Side by Side Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 957623003: Revert of Revert of [DevTools] Check request_id in DevToolsUIBindings::IndexPath (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/devtools/devtools_ui_bindings.h" 5 #include "chrome/browser/devtools/devtools_ui_bindings.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 570
571 void DevToolsUIBindings::IndexPath(int request_id, 571 void DevToolsUIBindings::IndexPath(int request_id,
572 int index_request_id, 572 int index_request_id,
573 const std::string& file_system_path) { 573 const std::string& file_system_path) {
574 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 574 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
575 CHECK(web_contents_->GetURL().SchemeIs(content::kChromeDevToolsScheme)); 575 CHECK(web_contents_->GetURL().SchemeIs(content::kChromeDevToolsScheme));
576 if (!file_helper_->IsFileSystemAdded(file_system_path)) { 576 if (!file_helper_->IsFileSystemAdded(file_system_path)) {
577 IndexingDone(index_request_id, file_system_path); 577 IndexingDone(index_request_id, file_system_path);
578 return; 578 return;
579 } 579 }
580 if (indexing_jobs_.count(index_request_id) != 0)
581 return;
580 indexing_jobs_[index_request_id] = 582 indexing_jobs_[index_request_id] =
581 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob>( 583 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob>(
582 file_system_indexer_->IndexPath( 584 file_system_indexer_->IndexPath(
583 file_system_path, 585 file_system_path,
584 Bind(&DevToolsUIBindings::IndexingTotalWorkCalculated, 586 Bind(&DevToolsUIBindings::IndexingTotalWorkCalculated,
585 weak_factory_.GetWeakPtr(), 587 weak_factory_.GetWeakPtr(),
586 index_request_id, 588 index_request_id,
587 file_system_path), 589 file_system_path),
588 Bind(&DevToolsUIBindings::IndexingWorked, 590 Bind(&DevToolsUIBindings::IndexingWorked,
589 weak_factory_.GetWeakPtr(), 591 weak_factory_.GetWeakPtr(),
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 if (frontend_loaded_) 919 if (frontend_loaded_)
918 return; 920 return;
919 frontend_loaded_ = true; 921 frontend_loaded_ = true;
920 922
921 // Call delegate first - it seeds importants bit of information. 923 // Call delegate first - it seeds importants bit of information.
922 delegate_->OnLoadCompleted(); 924 delegate_->OnLoadCompleted();
923 925
924 UpdateTheme(); 926 UpdateTheme();
925 AddDevToolsExtensionsToClient(); 927 AddDevToolsExtensionsToClient();
926 } 928 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698