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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc

Issue 19869003: ChromeOS changes for GetURL refactor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing failing tests. Created 7 years, 4 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 #include "chrome/browser/chromeos/extensions/file_manager/file_manager_util.h" 4 #include "chrome/browser/chromeos/extensions/file_manager/file_manager_util.h"
5 5
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 ExecuteHandler(profile, kFileBrowserDomain, action_id, url, 313 ExecuteHandler(profile, kFileBrowserDomain, action_id, url,
314 file_handler_util::kTaskFile); 314 file_handler_util::kTaskFile);
315 } 315 }
316 316
317 Browser* GetBrowserForUrl(GURL target_url) { 317 Browser* GetBrowserForUrl(GURL target_url) {
318 for (chrome::BrowserIterator it; !it.done(); it.Next()) { 318 for (chrome::BrowserIterator it; !it.done(); it.Next()) {
319 Browser* browser = *it; 319 Browser* browser = *it;
320 TabStripModel* tab_strip = browser->tab_strip_model(); 320 TabStripModel* tab_strip = browser->tab_strip_model();
321 for (int idx = 0; idx < tab_strip->count(); idx++) { 321 for (int idx = 0; idx < tab_strip->count(); idx++) {
322 content::WebContents* web_contents = tab_strip->GetWebContentsAt(idx); 322 content::WebContents* web_contents = tab_strip->GetWebContentsAt(idx);
323 const GURL& url = web_contents->GetURL(); 323 const GURL& url = web_contents->GetLastCommittedURL();
324 if (url == target_url) 324 if (url == target_url)
325 return browser; 325 return browser;
326 } 326 }
327 } 327 }
328 return NULL; 328 return NULL;
329 } 329 }
330 330
331 bool ExecuteDefaultAppHandler(Profile* profile, 331 bool ExecuteDefaultAppHandler(Profile* profile,
332 const base::FilePath& path, 332 const base::FilePath& path,
333 const GURL& url, 333 const GURL& url,
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 // If the file doesn't have an extension or its mime-type cannot be 855 // If the file doesn't have an extension or its mime-type cannot be
856 // determined, then indicate that it has the empty mime-type. This will 856 // determined, then indicate that it has the empty mime-type. This will
857 // only be matched if the Web Intents accepts "*" or "*/*". 857 // only be matched if the Web Intents accepts "*" or "*/*".
858 return ""; 858 return "";
859 } else { 859 } else {
860 return mime_type; 860 return mime_type;
861 } 861 }
862 } 862 }
863 863
864 } // namespace file_manager_util 864 } // namespace file_manager_util
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/printer_service_provider.cc ('k') | chrome/browser/chromeos/login/captive_portal_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698