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

Side by Side Diff: chrome/browser/ui/metro_pin_tab_helper_win.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/ui/metro_pin_tab_helper_win.h" 5 #include "chrome/browser/ui/metro_pin_tab_helper_win.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 // Get the path of the directory to store the tile logos in. 53 // Get the path of the directory to store the tile logos in.
54 base::FilePath GetTileImagesDir() { 54 base::FilePath GetTileImagesDir() {
55 base::FilePath tile_images_dir; 55 base::FilePath tile_images_dir;
56 if (!PathService::Get(chrome::DIR_USER_DATA, &tile_images_dir)) 56 if (!PathService::Get(chrome::DIR_USER_DATA, &tile_images_dir))
57 return base::FilePath(); 57 return base::FilePath();
58 58
59 tile_images_dir = tile_images_dir.Append(L"TileImages"); 59 tile_images_dir = tile_images_dir.Append(L"TileImages");
60 if (!base::DirectoryExists(tile_images_dir) && 60 if (!base::DirectoryExists(tile_images_dir) &&
61 !file_util::CreateDirectory(tile_images_dir)) 61 !base::CreateDirectory(tile_images_dir))
62 return base::FilePath(); 62 return base::FilePath();
63 63
64 return tile_images_dir; 64 return tile_images_dir;
65 } 65 }
66 66
67 // For the given |image| and |tile_id|, try to create a site specific logo in 67 // For the given |image| and |tile_id|, try to create a site specific logo in
68 // |logo_dir|. The path of any created logo is returned in |logo_path|. Return 68 // |logo_dir|. The path of any created logo is returned in |logo_path|. Return
69 // value indicates whether a site specific logo was created. 69 // value indicates whether a site specific logo was created.
70 bool CreateSiteSpecificLogo(const SkBitmap& bitmap, 70 bool CreateSiteSpecificLogo(const SkBitmap& bitmap,
71 const string16& tile_id, 71 const string16& tile_id,
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 GURL url = web_contents()->GetURL(); 451 GURL url = web_contents()->GetURL();
452 string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); 452 string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec()));
453 metro_un_pin_from_start_screen(tile_id, 453 metro_un_pin_from_start_screen(tile_id,
454 base::Bind(&PinPageReportUmaCallback)); 454 base::Bind(&PinPageReportUmaCallback));
455 } 455 }
456 456
457 void MetroPinTabHelper::FaviconDownloaderFinished() { 457 void MetroPinTabHelper::FaviconDownloaderFinished() {
458 favicon_chooser_.reset(); 458 favicon_chooser_.reset();
459 } 459 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698